Forum Discussion
changing data type
Hello,
Im new to Power BI and im kinda stuck while changing data type from text to duration. When I change the data type it gives me this error: "expression.error can not parse the literal duration value".
My goal is to filter the duration to be able to make a visualization of the tickets which have more than 2 hours of working time.
Please help, thanks!
hi, Anonymous
You may try this way:
Select t_time column, duplicate the column, then split the duplicate column
Then filter column t_time - Copy.1 who is greater than 2
Best Regards,
Lin
16 Replies
- Greg_DecklerCommunity Champion
Are you trying to do this in DAX or Power Query?
Can you post an example of the data? Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
That being said, check out these links:
https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486
https://community.powerbi.com/t5/Quick-Measures-Gallery/Milliseconds-Duration/m-p/406698
- AnonymousNot applicable
I am trying to do this in power query, the thing is that currently, the data type for the duration is text. But I want to make a schema with a filter which shows just certain durations.
- v-lili6-msftCommunity Support
hi, Anonymous
Please share your sampe pbix or some data sample and the formula and expected output.
It will be helpful for us to solve this case.
Best Regards,
Lin
- AnonymousNot applicable
Hi can u check my latest reply, I have posted a picture which shows what error I get. I checked ur links but cant fix this issue with it because it contains values greater than 24 hours.
- v-lili6-msftCommunity Support
hi, Anonymous
Can you post an example of the data? from the screenshot, we couldn't get other details.
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Best Regards,
Lin
- v-lili6-msftCommunity Support
hi, Anonymous
You could refer to this post:
Before this, you should change data type from text to date time.
If not your case, Please share your sampe pbix or some data sample and the formula and expected output. You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading
Best Regards,
Lin