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
Chirag_Sidana
Frequent Visitor

Clustered Column Chart - Showing Percentages Based on Legend

Hi,

 

I have built a clustered column chart for the data below:

 

Image1.PNG

 

 

 

 

 

 

 

 

 

 

 

The state acts as a filter for the chart. X-Axis is category and y-axis is Value. The legend is Category. Please see image below:

 

 

Image 2.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

I want to show % Value in this chart (instead of value).

% Value = (Sum of Value in category for the given data source)/(Sum of values across categories for the given data source)

Basically I want to show percentages in a clustered column chart based on the values in legend. I don't want to hard code the percentage values since I want to use this feature irrespective of the state filter at the top.

 

Can someone advice how to perform this?

 

Thanks in advance,

Chirag

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Chirag_Sidana,

 

Please new a measure:

percentage =
SUM ( TB[Value] )
    / CALCULATE ( SUM ( TB[Value] ), ALLEXCEPT ( TB, TB[State], TB[Data Source] ) )

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yulgu-msft
Employee
Employee

Hi @Chirag_Sidana,

 

Please new a measure:

percentage =
SUM ( TB[Value] )
    / CALCULATE ( SUM ( TB[Value] ), ALLEXCEPT ( TB, TB[State], TB[Data Source] ) )

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you! This is really helpful.

 

Regards,

Chirag

Seward12533
Solution Sage
Solution Sage

Something this this.

Pct of Total = DIVIDE([Measure]),CALCULATE([Measure],ALL(table[Category]))

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.