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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
bsas
Post Patron
Post Patron

Show different values in chart based on 3 conditions (2 slicer and all) in Stacked Bar Chart

Hello PBI Experts,

 

I have intersting challenge... how to show different values in Stacked Bar Chart based on values from slicer on values from another field (<> slicer list):

 

For example: I have slicer (field) with list of people and have a field with another list of people (totally different people).

Can I somehow show if slicer is selected = person from slicer if nothing selected list of people from "another" field.

 

I'd treid to use something like:

 

slicer4 = SWITCH(
	         TRUE(),
		CALCULATE(DISTINCTCOUNT('Opp-ty'[ss_projectmanageridname]),
ALLSELECTED('Opp-ty'[ss_projectmanageridname]))>1,
'Opp-ty'[ss_projectmanageridname],'Opp-ty'[Owner])

or

 

test_slicer3 = IF(ISFILTERED('Opp-ty'[ss_projectmanageridname]) 
&& DISTINCTCOUNT('Opp-ty'[ss_projectmanageridname])=1,
'Opp-ty'[ss_projectmanageridname],'Opp-ty'[Owner])

These are calculated columns (measures can't be used in field "Axis" on Stacked Bar Chart. The problem is that these cc show only person from slicer or all persons from "another field". 

 

Maybe someone faced with such issue?

 

Simple data fields:

Person1Person2money
Mariya Andriy10000
PetroOleh20000
Roman Andriy150000
Sergii Andriy3000
 OksanaOleh70000
4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@bsas,

 

Instead, you may drag both columns to Axis, and click the second icon "Go to the next level in the hierarchy" in the top left corner of the visualization.

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

Thanks @v-chuncz-msft but this is not what I need.

@bsas,

 

Another way is to select Unpivot Columns in Query Editor.

https://community.powerbi.com/t5/Desktop/multiple-variables-graph-filter/td-p/239301

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

Thanks @v-chuncz-msft will try to use this tomorrow.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors