cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ojie
Frequent Visitor

Data Type Changes After Closing Power Query

Hi guys

 

I have a custom column as shown below in power query

 

ojie_0-1605681931282.png

 

But when I close and apply

 

It changes to the below on the Data tab of my report

 

 

ojie_1-1605682054636.png

 

How do I correct this behavior..

 

Thanks

 

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @ojie 

 

You may add a new step as below in Power Query to convert 'Duration' data type to 'Text' before applying changes to Power BI Desktop. The pbix file is attached in the end.

= Table.TransformColumns(#"Changed Type",{"Column",each Duration.ToText(_)})

 

c1.png

 

Result:

c2.png 

 

Best Regards

Allan

 

If this post helps,then consider Accepting it as the solution to help other members find it faster.

View solution in original post

5 REPLIES 5
v-alq-msft
Community Support
Community Support

Hi, @ojie 

 

You may add a new step as below in Power Query to convert 'Duration' data type to 'Text' before applying changes to Power BI Desktop. The pbix file is attached in the end.

= Table.TransformColumns(#"Changed Type",{"Column",each Duration.ToText(_)})

 

c1.png

 

Result:

c2.png 

 

Best Regards

Allan

 

If this post helps,then consider Accepting it as the solution to help other members find it faster.

View solution in original post

PhilipTreacy
Super User III
Super User III

@ojie 

You're welcome.


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


PhilipTreacy
Super User III
Super User III

Hi @ojie 

Power Pivot doesn't have a Duration data type,so it converts your durations in PQ to decimal numbers where 1.0 represents 1 day.

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Thank you @PhilipTreacy 

 

 

ojie
Frequent Visitor

@PhilipTreacy  Can you help here? thanks

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors