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.
Posted this earlier but a moderator thought it was spam... It isn't.
I have only just begun using Power BI and I'm following along with some YouTube videos. I thought I had a good grip, so would create a visual off of my own data, but I am stuck!
I have a spreadsheet with a number of columns in. The most interesting ones are labelled "Item ID" (a unique reference) and "Time to Accept" which is hh:mm:ss. I want a card to show me the average time to accept value across each of my rows. I've selected the "Item ID" field and the "Time to Accept" fields which has produced this table:
I've then clicked Home -> New measure and entered "Average Time to Accept = AVERAGE(Sheet[Time to Accept])" but now the visual displays an error "Can't display the visual":
When I click "See details", here's what I see:
Solved! Go to Solution.
You can't use the Time datatype. You have to use DURATION.
Hi @christianMDU ,
Could you please tell me have you solve your issue now? If so ,please kindly provide the solution and mark your reply. If not, please provide your pbix file without privacy information and desired output with more details.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@christianMDU that means the data type of the column is text.
Change the data type to time in Power Query and close and apply.
Hi, thanks for the quick response. I changed the data type to "Time" but forgot to save/apply it. I've gone to redo it but now it's complaining that it cannot automatically convert the column:
@christianMDU can you start from scratch and update me you still get the error?
I deleted the measure and restarted Power BI Desktop but am still getting the error.
You do that in power query?
Can you share your model?
Sorry, I was doing this in the "Data" panel:
When I open "Transform data", I went into the Transform tab and changed the Data Type to "Time" there:
This seems to have worked, but now I have another problem as the values say "Error":
Is there some sort of maximum figure? It should show 29:41:41 as per the yellow bar.
Don't think it can go above 23:59:59
Is there anything I can do to convert that to 1 day, 5 hours, 41 min and 41 sec, for example?
You can't use the Time datatype. You have to use DURATION.
Thanks, that worked. It's giving me an average of "0.45" but Excel says it's 10:13:59 so I need to look at what else I've done wrong. I'm enjoying it though... 🙂
You want to take a look at this post: Solved: Purpose of "Duration" datatype in Power Query - Microsoft Power BI Community
It's no wonder it says .45 (but I won't go deep into that). I believe you can format a duration datatype using the FORMAT function to turn it into the form [HH]:mm:ss.
@christianMDU ye sure, I'm just not near pc right now, but I hope someone will reply, there are multiple ways to do so.
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 |
---|---|
46 | |
22 | |
20 | |
15 | |
13 |
User | Count |
---|---|
49 | |
41 | |
39 | |
19 | |
19 |