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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Google Analytics Duration in PowerBI

Hi

I've pulled some GA data and selected 'time on page' to pull into the query editor. This automatically gets assigend 'duration' as the data type in the query editor which is correct, however when applyng to the report for build, the values update to decimals and duration data type is not found anymore.

See screenshots below. What would be a solution to getting it back to duration for reporting? I need to be able to present average time on a page.

 

Alex_Mgg_1-1623687183750.png

 

Alex_Mgg_2-1623687193150.png

 

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks, I ended up splitting the values out as they were 0.00:00:00 so I could work with minutes and seconds indivually by transforming them.

 

Thanks again for your help

View solution in original post

6 REPLIES 6
Gabriel_Walkman
Continued Contributor
Continued Contributor

Hi!

I tried durations some time ago but could not get them to sum or average in a visual. I had to change the columns back to hours (as decimal) or minutes (as whole numbers).

Edit: oh yeah, there should be a 'Time' option under 'Data type' in your screenshot. Have a test yourself.

Anonymous
Not applicable

Hi @Gabriel_Walkman 

 

What values did you reproduce for minutes when selecting whole number as the data type? For me, 55 minutes would convert to 0 as a whole number. 

 

For the data type time, this looks good but doesn't allow for the selectable measure average. Do you have any suggestions of how average could be put together via a custom measure?

 

Alex_Mgg_0-1623751980580.png

 

Thanks

 

I converted duration to minutes in power query. I did not have to take seconds into consideration. New custom column =
Duration.Hours( [duration] ) * 60 + Duration.Minutes( [duration] )

Anonymous
Not applicable

Thanks, I ended up splitting the values out as they were 0.00:00:00 so I could work with minutes and seconds indivually by transforming them.

 

Thanks again for your help

amitchandak
Super User
Super User

@Anonymous , you can change data type to time and check

https://community.powerbi.com/t5/Service/Google-Analytics-time-duration-formatting-issue/td-p/107011

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak 

 

As per my thread with with Gabriel, for the data type time, this looks good but doesn't allow for the selectable measure average. Do you have any suggestions of how average could be put together via a custom measure?

 

Alex_Mgg_0-1623751980580.png

 

Thanks

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.