Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
cassimama
Frequent Visitor

Multiple ga4 into powerbi data sampling ?

Hi,

I am using power bi to create some charts for over 300 analytics accounts all in one.

I am using a custom function to get this  ( i use a method from curbal youtube) 

I can access the accounts and it pulls in the data but I am only getting the last two months of data. 

If i do individual accounts without the custom funcion. I get the full data ( from July 2023 ) But when i do all of them or more than one I only get two months. 

Is this just data sampling because of the size of the query ?   - anyone have any idea how I can get around it ? 

 

CUSTOM FUNCTION : 
let Multiple =(AccountId as text,PropertyId as text,PropertyId2 as text)=>
let
Source = GoogleAnalytics.Accounts([Implementation="2.0"]),
Account = Source{[Id=AccountId]}[Data],
Property = Account{[Id=PropertyId]}[Data],
Property2 = Property{[Id=PropertyId2]}[Data],
#"Added Items" = Cube.Transform(Property2,
//You have to susbstitute this part with a your new query (dimensions, metrics) and create a new function for each query. Just create the query as a simple table and copy it here.
{
{Cube.AddAndExpandDimensionColumn, "date", {"date"}, {"date"}},
{Cube.AddAndExpandDimensionColumn, "eventName", {"eventName"}, {"eventName"}},
{Cube.AddAndExpandDimensionColumn, "firstUserSourceMedium", {"firstUserSourceMedium"}, {"firstUserSourceMedium"}},
{Cube.AddAndExpandDimensionColumn, "pagePath", {"pagePath"}, {"pagePath"}},
{Cube.AddAndExpandDimensionColumn, "pageTitle", {"pageTitle"}, {"pageTitle"}},
{Cube.AddMeasureColumn, "conversions", "conversions"},
{Cube.AddMeasureColumn, "sessions", "sessions"},
{Cube.AddMeasureColumn, "totalUsers", "totalUsers"},
{Cube.AddAndExpandDimensionColumn, "dateHourMinute", {"dateHourMinute"}, {"dateHourMinute"}}
})
in
#"Added Items"
in Multiple

 

 

2 REPLIES 2
cassimama
Frequent Visitor

Thanks - Windsor Ai will cost me over $500 a month and Im trying to avoid that. I am not sure what you are referring to in regards to making sure the settings are the same. There are no date range settings when bringing the data into power bi from analytics - only filtering the data once it has been retrieved. 

v-yaningy-msft
Community Support
Community Support

Hi, @cassimama 

You can try the following ways to solve the problem.

1. Check your settings, ensure that the same settings (date range, filters, etc.) are applied in both Google Analytics and Power BI.
2. Consider using a third-party connector that supports GA4 Data.
Third-party connectors link: 
Connect Google Analytics to Power BI (windsor.ai)

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum


Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.