Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
How can I get the filtered value of a group from a single value?
I am looking at pupil numbers by school (individual school code) and the schools locality (multiple schools per locality/catchment)
Heres a cut of my data (.Total Pupils is a measure)
I am displaying the number of pupils by school in a bar chart, then the sum of pupils by locality/catchment on a shape map, listing the total by school and locality/catchment
When I select a locality/catchment on the map this filters the report correctly, filtering all the schools and the total number of pupils in that locality/catchement
When I filter the bar chart I would like to disaplay the total number of pupils in the selected school, but the total for the locality/catchment, buut I cant workout the DAX to do this....at the mo it just displays the total for the selected school 😞
My display label is working but I cant calculate the total for the selected locality, can anyone help?
I tried all sorts to get this working but I am abviously missing something.
Solved! Go to Solution.
@Cbutler
The following measure will show you the total for the locality of the school coded selected:
Locality Total =
var __local = SELECTEDVALUE(Table[Locality]) return
CALCULATE(
[Total Pupil],
Table[Locality] = __local,
ALL(Table[School Code])
)
________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Cbutler
The following measure will show you the total for the locality of the school coded selected:
Locality Total =
var __local = SELECTEDVALUE(Table[Locality]) return
CALCULATE(
[Total Pupil],
Table[Locality] = __local,
ALL(Table[School Code])
)
________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Brilliant thanks! thats got it! Thanks you so much!
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |