If you want to reuse a power bi file you downloaded form Curbal.com, here are the steps to make it your own, depending on the source you have used.
Watch it on YouTube
If you prefer, you can watch our demo in YouTube, otherwise you can follow a step by step guide below. Let’s start.
Access source file in Power BI
Download the Power BI file and open it.
When you open the file, you will see a yellow ribbon letting you know that you have pending changes. Ignore it, it is only trying to refresh the sources.
Click on Edit Queries:
And you will see a yellow ribbon showing you an error. The error message is not very descriptive. What it is trying to tell you is that something is wrong with the source: we need to change the source path from my source to yours.
Depending on which source you are using the method is different.
Change Google Analytics source
When you open a file that has google analytics as a source, you will see that it doesnt look the same as in the example given in the tutorial. The reason for that is that i have replaced the account from a site with valid data to a site that is almost empty.
Dont worry, everything is still there, and once you connect the data it will work as intended.
If Google analytics is the source, follow this steps:
Click on “View” and “Advance editor”:
On the Advance editor, you will access the connection file that Power Bi uses.
You need to replace the numbers 1, 2, 3 with your own.
There are two ways you can do this:
- You replace them manually or
- You create a new connection to find out what your numbers are and copy them in the source file.
NOTE: I recommend you create a new connection and copy the data because replacing the numbers is not always safe as sometimes Power BI uses the names instead of the numbers.
Let’s go through the steps on how to find out how your connection string looks like:
Click cancel on the Advance editor and click Home and Close and Apply to go back to Power Bi main window.
Click on “Get Data” or Recent sources and select Google Analytics:
Select your account, property, and view:
and now we will export a table with the following parameters:
- From the Time Category select “Date”
- And as we always need a metric, select “Sessions” from the session category.
Click on Load.
Once you have done that, click again on View > Advance Editor and you will see your account, UA and view number or name:
Copy the lines highlighted in blue:
let
Source = GoogleAnalytics.Accounts(),
#”1″ = Source{[Id=”1″]}[Data],
#”2″ = #”1″{[Id=”2″]}[Data],
#”3″ = #”2″{[Id=”3″]}[Data],
#”Added Items” = Cube.Transform(#”3″,
And paste it on the source code to substitute the 1, 2 and 3 you have on the Power BI file you downloaded. You can replace only the numbers, remember:
- 1: account no or account name
- 2: UA code
- 3: View number or view name
Click on Load and your data will be loaded instead of mine.
Do the same for all similar sources and you can start using the Power BI file with your own Google Analytics source.
Leave a Reply