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
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
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.