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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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.

PhilipTreacy
Super User
Super User

@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
Super User

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors
Top Kudoed Authors