Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hey everyone,
So initally i had two time values, which was StartTime and EndTime and right now I got the duration between both as one column, but in the duration format. The problem is, I can't figure out how to make it as a decimal or whole number, so I could display it as a sum in histogram. The closest I got to this is take duration as total hours, however, I need precise time to be displayed in the histogram as a value. Any ideas?
Hello @Anonymous
check out this code
let
StartTime = #time(12,0,0),
EndTime = #time(16,30,0),
DurationDigital = Number.From(EndTime-StartTime)*24
in
DurationDigital
Copy paste this code to the advanced editor in a new blank query to see how the solution works.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
It seems like its displaying 4,5, but i would need it to be 4:30(as a decimal number) if that makes sense.
Thanks for your help.
Hello @Anonymous
4:30 it's text format. Just convert the duration to text. Here the code
let
StartTime = #time(12,0,0),
EndTime = #time(16,30,0),
DurationDigital = Duration.ToText(EndTime-StartTime)
in
DurationDigital
Copy paste this code to the advanced editor in a new blank query to see how the solution works.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hello @Anonymous
I don't think that you can sum a time-format like "4:30" in Power BI. I don't know how exactly you need to sum and show. But you could make something like this
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
@Jimmy801 That would be a possible solution how did you do that? can you share your file with me?
Hello @Anonymous
but I didn't any sum. What i did is to create a column with decimals and a new column1 to format it to "hh:mm".
in the histrogram I've used Column1 for values and Column for the Axis. I don't know if this could be of any help. But maybe it could be a starting point 🙂
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
@Jimmy801 That is what I need, however I can't sum up text value to display it in histogram, any way I could sum up this text format to display it into values?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!