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! Learn more

Reply
Seanan
Solution Supplier
Solution Supplier

Clustered bar chart with one static bar and one responsive bar

Hi all,

I have a clustered bar chart that looks like this:

PBIDesktop_wcJoKTVvmf.png

 

 

 

 

I also have some on-screen slicers that filter down characteristics such as: Gender, Ethnicity, etc.

There are 2 tables that I am getting the data from, LearnerTable and SurveyTable, which have a relationship using the Keycode column that is in both tables.

In the example image above, I have a simple measure that counts the survey keycodes. However, for the all learners bar in the chart I need this to be static so that it will not be affected when selecting the on-screen filters.

Would anyone be able to help me with this?

1 ACCEPTED SOLUTION
Seanan
Solution Supplier
Solution Supplier

I managed to find a solution using the following code:

All Learners = CALCULATE(COUNT('LA_LSSurvey'[Keycode]),ALLEXCEPT(LA_LSSurvey,LA_LSSurvey[SurveyAnswerEnglish]))

 

Thanks for trying to help @amitchandak

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Seanan , You can have measure like

 

Calculate([Your Measure], filter(all(Table], Table[learners] = Max(Table[learners] ) ) )

 

 

Assumes the axis column is learners

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak 

Thanks for your swift response.

So I've tried your measure with both tables:

All Learners = CALCULATE('MeasuresTable'[Selected Learners], FILTER(ALL('LA_LSLearners'),'LA_LSLearners'[Keycode] = MAX('LA_LSLearners'[Keycode])))
All Learners = CALCULATE('MeasuresTable'[Selected Learners], FILTER(ALL('LA_LSSurvey'),'LA_LSSurvey'[Keycode] = MAX('LA_LSSurvey'[Keycode])))

The first measure is returning no results and the second measure is only returning 1 result (No filters have been selected).

My axis are as follows:

PBIDesktop_h1JcFp18Q0.png 

 

 

 

 

 

 

An example of the outcome I'm looking for is:

All learners bar = 21 for Happy, 2 for Unhappy

Selected learners bar (with filters applied) = 12 for Happy, 1 for Unhappy. 

 

I hope this helps clear anything up.

 

Seanan
Solution Supplier
Solution Supplier

I managed to find a solution using the following code:

All Learners = CALCULATE(COUNT('LA_LSSurvey'[Keycode]),ALLEXCEPT(LA_LSSurvey,LA_LSSurvey[SurveyAnswerEnglish]))

 

Thanks for trying to help @amitchandak

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