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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
djones
Frequent Visitor

Stacked bar chart - values as part of the whole column (normalized)

Hi all,

 

Thanks in advance for the help. I'm new to Power BI and could use some assistance. Example of data:

 

 column1column2
category1200hrs2800hrs
category2100hrs3300hrs
category3300hrs4700hrs
  10800

 

I'm trying to show how often each category, column 1 occurred per 1000 hours of the sum of column 2. So 200/10800 = .018519 * 1000 = 18.518 hours per 1000 hours of the sum (from column 2)

 

category10.01851918.51852
category20.0092599.259259
category30.02777827.77778

 

The 18.51, 9.25, 27.77 is what I need graphed in a stacked bar chart, by year, month, week. I need to be able to drill into each of these levels, so I need the aggregation to by dynamic. Right now all I can seem to do is have 200/2800 = .071 * 1000 = 71.42, which is not what I'm looking to do. If I need to provide any further information please let me know.

 

Thanks

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @djones ,

 

Add the following measure to your model:

 

Measure =
SUM ( Table1[column1] )
    / CALCULATE ( SUM ( Table1[column2] ); ALL ( Table1[Category] ) ) * 1000

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @djones ,

 

Add the following measure to your model:

 

Measure =
SUM ( Table1[column1] )
    / CALCULATE ( SUM ( Table1[column2] ); ALL ( Table1[Category] ) ) * 1000

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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