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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

Duration transformation error when loading data from Google Analytics

Dear all

 

When I try to load duration from Google Analytics, I encountered an error as below.

 

While loading data into Power BI and editing in Power Query Editor, it looks fine.

 

Data from Google Analytics while loading to Power BIData from Google Analytics while loading to Power BI

 

However, when I clicked "Close & Apply" and visited the data in "Data", the column turned into a decimal number and had no way to make it duration in the column tool tab.  

 

Result in "Data"Result in "Data"

 

Does anyone deal with this issue before and may have any solution? Please kindly advise.

 

Thank you!

1 ACCEPTED SOLUTION
edhans
Super User
Super User

Duration is not a supported data type in the DAX model, so when Power Query loads it, it converts it to decimal. 1 day is 1. 12 hrs would be .5. And so on. So it is fractions of day. Not a bug, or anything you are doing wrong. Just how it works.
So in your example, 3 becomes 3/24, or .125, then 21min becomes 21/60/24, or .0083333, and so on, then it is all added up and becomes the .13* number you see.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

1 REPLY 1
edhans
Super User
Super User

Duration is not a supported data type in the DAX model, so when Power Query loads it, it converts it to decimal. 1 day is 1. 12 hrs would be .5. And so on. So it is fractions of day. Not a bug, or anything you are doing wrong. Just how it works.
So in your example, 3 becomes 3/24, or .125, then 21min becomes 21/60/24, or .0083333, and so on, then it is all added up and becomes the .13* number you see.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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