cancel
Showing results for 
Search instead for 
Did you mean: 
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 IV
Super User IV

@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...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

@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

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.