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
karnzo
Regular Visitor

Beginner question - formatting graph axis

I have read several answered questions in the the forums and can't seem to find exactly what I am looking for.  I am fairly new to Power BI so I am still in the learning phase.  I am trying to display a simple stacked bar chart using the following data:

 

Code         Duration

H0036        20

H0036        17

H2019        15

H0036        45

H2019        30

 

My data (from an excel spreadsheet) is over 20k rows of similar data.  I was able to create a bar chart (see below) that groups it by the "Code" column and "Duration" column, however it displays the sum of the total number of the duration column per code.  What I need to show on the X axis is the this total number divided by 60 (the duration stands for minutes, so I would like to display this as total hours and not total minutes).  I have tried measures and calculated formulas and I either I'm not understanding the syntax or how this is supposed to work. 

 

 

Capture.JPG

In summary, I basically need to customize the X axis to show this number in total hours.

 

Any advice would be greatly appreciated.  Thanks!

 

 

 

1 ACCEPTED SOLUTION
Phil_Seamark
Microsoft Employee
Microsoft Employee

HI @karnzo

 

It sounds like a calculated measure should work, if I understand your post.

 

Something like

 

Hours = SUM('table1'[Duration] ) / 60

and then drag this measure to the values area of your chart in place of the field.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

1 REPLY 1
Phil_Seamark
Microsoft Employee
Microsoft Employee

HI @karnzo

 

It sounds like a calculated measure should work, if I understand your post.

 

Something like

 

Hours = SUM('table1'[Duration] ) / 60

and then drag this measure to the values area of your chart in place of the field.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

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.