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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
apmulhearn
Helper III
Helper III

Google Analytics - GA4 - Integer vs Decimal Issue resulting from cube data type

I am using the Google Analytics 2.0 connector and experiecing a major data loss issue.

I am trying to pull conversion/key event data with a couple of attribution dimensions.
The event is just a count - for example, how many downloads per day.

Many rows are coming in with errors, because the cube in the dataset expects an integer, but Google Analytics allows for fractional attribution.

Here are the steps:
1. Source: = GoogleAnalytics.Accounts([Implementation="2.0"])
2. Navigation:  #"properties/32129****"{[Id="properties/32129****"]}[Data]
3. Added Step: = Cube.Transform(#"properties/1",
{
{Cube.AddAndExpandDimensionColumn, "date", {"date"}, {"date"}},
{Cube.AddAndExpandDimensionColumn, "medium", {"medium"}, {"medium"}},
{Cube.AddAndExpandDimensionColumn, "source", {"source"}, {"source"}},
{Cube.AddMeasureColumn, "conversions:africa_brochure_download", "conversions:africa_brochure_download"}
})

The issue seems related to Cube.AddMeasureColumn - this is where I am receiving errors. 
I don't know how to get the column to either round or allow fractions. Trying to apply those steps after the fact isn't working, because of the errors.

apmulhearn_0-1713241062516.png

 



4 REPLIES 4
QueryWhiz
Post Patron
Post Patron

Hi @apmulhearn As a workaround, maybe you can try to test your connection with a 3rd party tool, by doing so you won't need to use a cube structure and you'll be able to directly export the data from GA4 Api, therefore avoiding these kind of issues. I've tried windsor.ai, supemetrics and funnel.io. I stayed with windsor because it is much cheaper so just to let you know other options. In case you wonder, to make the connection first search for the GA4 connector in the data sources list:

 

GA4-1.png

 

After that, just grant access to your GA4 account using your credentials, then on preview and destination page you will see a preview of your GA4 fields:

 

GA4-2.png

 

There just select the fields you need. Finally, just select PBI as your data destination and finally just copy and paste the url on PBI --> Get Data --> Web --> Paste the url. 

 

SELECT_DESTINATION_NEW.png

Teresa780
Regular Visitor

Hi @apmulhearn, I'm facing the same issue. Did you find a solution?

v-heq-msft
Community Support
Community Support

Hi @apmulhearn ,
Based on your description and the screenshots provided, the heart of the problem seems to be that multidimensional datasets require integer values, but Google Analytics provides decimals for certain metrics.
You can do this by converting the data type from decimal to integer before adding the metric value columns to the multidimensional dataset. This can be done by rounding the number or truncating the decimal portion. If you are using a custom query to fetch data from Google Analytics, you may have the opportunity to adjust the query to round or truncate the values before returning them. This can be circumvented by ensuring that the data type matches the expectations of the multidimensional dataset from the source.
Applying rounding or fraction allowance steps after the fact does not work due to errors, so address data type mismatches as far upstream in the data processing pipeline as possible.

Best regards,

Albert He

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hi @v-heq-msft and thank you for the reply. I am using the built in Google Analytics Connector (2.0 Beta). I don't believe there is a way to make the change you've suggested - but if there is, I'd love to know it!

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors