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.
Hi all,
I have a clustered bar chart that looks like this:
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?
Solved! Go to Solution.
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
@Seanan , You can have measure like
Calculate([Your Measure], filter(all(Table], Table[learners] = Max(Table[learners] ) ) )
Assumes the axis column is learners
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:
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.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
97 | |
80 | |
67 | |
63 |
User | Count |
---|---|
147 | |
110 | |
108 | |
85 | |
64 |