• Skip to main content
  • Skip to footer

Curbal

Learn how to grow your business with your data and Power BI

  • Data Stories
    • Power BI Stories
    • 1 dataset, 100 matplotlib visualizations
  • Learning Portal
    • Download Center
    • 25 Days Challenge
    • DAX Glossary
    • Power BI
    • Power BI by Topic
    • Python
    • 1 dataset, 100 matplotlib visualizations
  • Courses
    • Power BI Mini Master Class 1: Using a REST API as a data source
    • Power BI Master Class 1: COVID Tracker
    • Introduction to Power BI – FREE Online course
    • M Language + Power Query Course Bundle
    • Power Query Online Training [updated 2022]
    • M Language Online Course: The unofficial and Practical Reference Guide [updated 2025]
    • My Courses
  • Shop
    • Courses
    • Master Classes
    • Template Apps
    • JSON Themes
  • Cart
  • Register/ Log In
    • Become a Member
    • Log In
    • My account
    • My Courses
  • Search
  • Contact
You are here: Home / Google Analytics / Reuse a Power BI file (change source path files)
Reuse a Power BI file (change source path files)

Reuse a Power BI file (change source path files)

posted on December 27, 2015

 

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.

Reuse a power bi file youtube

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.

error message power bi

Click on Edit Queries:

2. power bi 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.

3. queries error power bi

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”:

4. change source google analytics power bi

On the Advance editor, you will access the connection file that Power Bi uses.

change in the google analytics code

You need to replace the numbers 1, 2, 3 with your own.

There are two ways you can do this:

  1. You replace them manually or
  2. 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.

Close and apply power bi

Click on “Get Data” or Recent sources and select Google Analytics:

Get data or recent sources Power BI

Select your account, property, and view:

select account, property, view, power bi google analyticcs

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:

4. change source google analytics power bi

Copy the lines highlighted in blue:

6. copy source connection

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.

Filed Under: Google Analytics, Microsoft Power BI

Join our community of over 50,000 professionals

Become a Member

Subscribe to YouTube

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Footer CTA

Join our community of +50,000 professionals

Become a Member

Subscribe to YouTube

About me:

Curbal AB
Badhusgatan 7B
722 15 – Västerås
Sweden

OrgNo: 5569680852 | VAT: SE556968085201

 

Location:

© Copyright 2014-2025 · Curbal AB · All Rights Reserved · Privacy Policy · Terms of Service · Refund Policy · Log In