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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
cmackay
New Member

Google Analytics time duration formatting issue

Hi guys,

 

We are connecting Power BI Desktop to the Google Analytics online service, and are having an issue with the duration fields (e.g. Avg. Time on Page).  On Google Analytics this is in the format HH:MM:SS, however when we pull this field back into the BI report it gives a decimalised format.

 

An example of this is a time of 00:00:18 is showing on the BI report as 0.00431.

 

We've created a DAX formula to try converting this...

Duration = MOD(MOD('Secure Website Data (2)'[Avg. Time on Page],3600),60)

 

...however it is coming up with the same decimalised value.

 

Could anyone please tell us how the 0.00431 value in Power BI relates to the time duration in GA?

 

Thanks in advance for your help.

 

Calum

 

1 ACCEPTED SOLUTION
v-caliao-msft
Microsoft Employee
Microsoft Employee

Hi @cmackay,

 

What's the data type that column? You can change the data type to Time.

Capture.PNGCapture1.PNG

Regards,

Charlie Liao

View solution in original post

3 REPLIES 3
v-caliao-msft
Microsoft Employee
Microsoft Employee

Hi @cmackay,

 

What's the data type that column? You can change the data type to Time.

Capture.PNGCapture1.PNG

Regards,

Charlie Liao

tommcmaster
Frequent Visitor

https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-data-types/

 

Duration is the data type used when we first import our data and can view it as a type before we load the data. From there, Duration is converted into a decimal which we need to convert back.

 

Tom.

Greg_Deckler
Community Champion
Community Champion

See my blog post here:

http://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486

 

Also vote for a true time duration in Power BI Desktop here:

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/8814178-field-of-duration-type



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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