The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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!
Solved! Go to Solution.
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
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
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
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.
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
Something like this?
I have selected the time value which is causing the problem.
hi, @Anonymous
Power bi not support duration type, I'd like to suggest you convert it as total second or other similar numeric value to calculate.
You can also take a look at below blog to know how to handle with duration in power bi:
What is your expected output in power bi(not power query )? maybe we could help you get your expected output by DAX.
Best Regards,
Lin
I want to filter the tickets in Power BI who have a time of 2 hours +
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
Thanks this works but what if a new value is added in the t_time column, will it be automatically split in the other columns wich I made?
hi, @Anonymous
Yes, it will be automatically split into the other columns when you refresh data.
https://docs.microsoft.com/en-us/power-bi/refresh-desktop-file-local-drive
https://docs.microsoft.com/en-us/power-bi/refresh-scheduled-refresh
Best Regards,
Lin
okay, one last question. What if I publish it and make a dashboard with those details. Will the new data that is added automatically be synced and divided into these columns?
hi, @Anonymous
Yes, the new data that is added automatically will be synced and divided into these columns.
Of course, you need to learn about how to set refresh.
Best Regards,
Lin
okay thank you very much for your help
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.
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
It happens when I change the data type from text to duration and it only gives an error where the duration is greater than 24 hours. How is it possible to fix that issue?