Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
MRBranco
Frequent Visitor

Duration in Column Chart

Hello,

I'm in trouble with duration in a Column Chart.

I have a table (tbDuration):

tbDuration.png

Data Type: Time (Start/Finish/Duration)

To sum Duration, I had to create 6 measures:
1 - TotalDuration = SUM(tbDuration[Duration])
2 - Days = INT([TotalDuration])
3 - Hours = FORMAT([TotalDuration], "HH")
4 - Minutes = FORMAT([TotalDuration], "nn")
5 - Seconds = FORMAT([TotalDuration], "ss")
6 - NewDuration = [Days]*24+[Hours]&":"&[Minutes]&":"&[Seconds]

 

And I added in a table to sum NewDuration and it worked !!

sum of newDuration.png

But, now I need to put this result in a Stacked Column Chart like this:

columnChart.png

I've tried some ways, but it didn´t work yet.

Thanks for any help.
MRBranco

1 ACCEPTED SOLUTION

Hi @MRBranco ,

 

Would you please refer to  https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/td-p/793639 and use custom formart for it :https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-september-2019-feature-summary/#customForm...

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@MRBranco , measure it a text column.  You will able display but in visual you have to use duration(Time) Type measure only.

 

https://radacad.com/calculate-duration-in-days-hours-minutes-and-seconds-dynamically-in-power-bi-usi...

@amitchandak, thanks for your help.

 

But I didn't get it. 😞

Is it possible to send me an example?

 

Thanks in advance !

MRBranco

Hi @MRBranco ,

 

Would you please refer to  https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/td-p/793639 and use custom formart for it :https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-september-2019-feature-summary/#customForm...

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.