Forum Discussion
Filter a card using a table
- 6 months ago
The issue was that some activities had an attendance of 0 so I needed to explicit about filtering that out:
Total Activities with Filtering =
// Check whether there is filtering on attendance groups
VAR _NoSelection =
(ISBLANK(SELECTEDVALUE(attendance_groups_DIM[AgeGroup])) &&
ISBLANK(SELECTEDVALUE(attendance_groups_DIM[TypeGroup])))RETURN
CALCULATE(
[Total Activities],
// If there is filtering, count activities only where the count of attendances for the relevant group is not 0
// It's not strictly necessary to wrap "UnpivotedAttendances_FACT[Value] <> 0" in an IF statement, but without it, it won't count activities with 0 attendance (and it looks like there is one such activity)
FILTER(UnpivotedAttendances_FACT,
IF(_NoSelection = FALSE,
UnpivotedAttendances_FACT[Value] <> 0,
TRUE())
))
Hi HollyMusgrove,
There are few possibilities that your card visual is not getting filtered.
- Edit interactions is turned off between visuals:- check and enable the same from Format โ Edit interactions
- Could be a relationship direction issue which is not filtering the visual propely, check your filter direction, choos the right direction using Crossfilter() function or if there are multiple relationship ships use the correct one using userelationship() function
- Inactive relationship or diconnected table check for the same
Relationships are not clear from the screenshot you shared.
if nothig works then share the sample data so i can investigate further.
๐ I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
๐ก Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
๐ As a proud SuperUser and Microsoft Partner, weโre here to empower your data journey and the Power BI Community at large.
๐ Curious to explore more? [Discover here].
Letโs keep building smarter solutions together!