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.
I know that there are a lot of text / time conversion discussions on the site, but none of them seem to fit my situation. I am hoping someone may be able to assist me with how I can convert the following examples from text to time. The ultamite goal I have is to be able to count rows based on a filter that have a 'time less than 4 hours', 'time less than 24 hours', and then 'time greater than 24 hours'. My first step was to be able to convert the column containing these values to Time, but when I try, Power Bi throws a message that it cannot convert the column.
A few text field examples:
9 minutes
34 minutes
12 seconds
1 day 12 minutes
11 hours 3 minutes
Any assistance would be appreciated.
Thank you!
Solved! Go to Solution.
@Marcjc,
Please check if the Power Query code in the following PBIX file returns your expected result.
https://1drv.ms/u/s!AhsotbnGu1Nok3aBo-5kuXIjmgz_
Regards,
Lydia
How do you want to display "9 mins" or " 1 hr 22 mins" ?
Thansk
Raj
Thank you for the quick reply... I am not really worried about how the time is displayed in the converted column in the table because the ultimate goal is to present a single number (count) of the rows that fit the filter criteria.
Sample data for review.
@Marcjc,
Please check if the Power Query code in the following PBIX file returns your expected result.
https://1drv.ms/u/s!AhsotbnGu1Nok3aBo-5kuXIjmgz_
Regards,
Lydia
Thank you. I was able to use this. I ended up adding the seconds conversion to my filter and then used advanced filtering for less than or greater than my requirements. Thank you for this! I have marked it as the solution.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |