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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
GuestUser123
Regular Visitor

How to Visualize Duration?

Hello Everyone,

I am a newbie and I need one help. I have a scenario wherein I have the Start and End Time with me as one of the columns in my dataset. I have calculated the Duration(in days) using Datediff in order to calculate the Selling Time. Now I want to visualize this Selling time across multiple categories. However, when I am trying to visualize it by using a bar graph, for example, I could see the sum total of Selling Time (Duration in days) for each category. Example: Home 120 days, Furniture 100 days etc.. which is actually not representing a better view.

What could be the best approach to Visualize Selling Time ?

Thank You.

Here is the sample snapshot of the scenario:

Example of the scenarioExample of the scenario

3 REPLIES 3
mahoneypat
Microsoft Employee
Microsoft Employee

Please see this article for a good way to calculate and format durations.

Calculate and Format Durations in DAX – Hoosier BI

 

In your case, that might be a measure like this one, and then use the Category column as your legend or axis.

 

Selling Duration = SUMX(Table, INT(Table[End Time] - Table[Start Time])

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Hi @mahoneypat Thank you for the response. I created a Selling Time Measure as suggested by you and tried to visualize the same with Category Name in Axis and Selling Time in the Values. However, it still does not represent a great picture. Maybe I am doing something wrong here. Could you please refer to the below snapshot? 

Thank You.

Snip.png

 

Hi @GuestUser123  

 

I don't see anything wrong. So, what's wrong with @mahoneypat advice and what results do you want?

 

Janey

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.