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

100% Stacked Column Chart with measure and parameter field

Hello Everyone,

 

I need help because I can't figure out the solution.

 

I have a stacked column chart and I would like to transform it to a 100% stacked column chart using measure.
This is the simple measure that works:

 

# Sales = SUM('Data'[Products sold])
% Sales = DIVIDE([# Sales], CALCULATE([# Sales], ALL('Data'[Posting Type])))

[Posting Type] is a field which I use as a legend among others because it is a selected value from a field parameter.
 

ASuhaji_0-1685726055167.png

 

So the measure above perfectly works if the "Posting Type" is selected but if I change it to another value, the calculation will understandably not be good (the 'Data'[Posting Type] expression should change dynamically).

 

Could you help me find a solution to this problem?

 

Thank you in advance.

 

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @ASuhaji 

 

Can you provide some sample data? How does "Posting Type"/"Procurement Type"/"Partnership Type" show in the underlying data table? Are they from the same table? And what is the current result when you select other values except "Posting Type"? 

 

Best Regards,
Community Support Team _ Jing

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.