Forum Discussion
Visual filter by Measure or maybe Conditional filter
Hi Mera9,
Thank you for reaching out to the Microsoft Fabric Community Forum. Thank you Cookistador, for your inputs on this thread.
Right now, the card and table are independent the table does not filter itself based on the "Yes"/"No" shown on the card.
- Visual-level filters in Power BI don't directly reference a value from another visual (card → table).
- Measures cannot directly control visual filtering unless specially designed.
They are missing a dynamic connection between the Card's logic and the Table filtering.
Create a New Measure to Filter the Table:
Show Row Based on Audit Card =
VAR HasOverdue =
CALCULATE(
COUNTROWS('AUDIT'),
'AUDIT'[Audit] = "Overdue"
)
RETURN
IF(
HasOverdue > 0 && 'AUDIT'[Audit] = "Overdue",
1,
0
)
Now, go to the Table visual:
- Drag Show Row Based on Audit Card into the Filters pane of the Table.
- Set the filter to show only when Show Row Based on Audit Card = 1.
This way:
- If the card says Yes (overdue audits exist), the table only shows "Overdue" rows.
- If the card says No (no overdue audits), the table will show nothing.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
- Mera91 year agoFrequent Visitor
This is not the right logic. If I select Country, and the table shows me 30 rows (columns Name, Number, Next Audit) where 2 are 'yes' and 28 are 'no', then in the card it shows 'yes', and in the table I need to see only 2 'yes'. And if there are absent 'yes' values, then I need to see 'no' in the card and just rows that include 'no' values in the table.
- v-kpoloju-msft1 year agoCommunity Support
Hi Mera9,
Thank you for your follow up and for clearly explaining the behaviour you're expecting.You're right, the previous logic doesn't filter the table based on the card’s output. To align the table with the card’s logic dynamically, we can use a measure that adapts row level visibility depending on whether "Overdue" values are present in the current filter context.
Revised Dax:Show Row Based on Card = VAR HasOverdue = CALCULATE( COUNTROWS('AUDIT'), 'AUDIT'[Audit] = "Overdue" ) RETURN IF( (HasOverdue > 0 && 'AUDIT'[Audit] = "Overdue") || (HasOverdue = 0 && 'AUDIT'[Audit] <> "Overdue"), 1, 0 )
Drag Show Row Based on Card into the Filters on this visual pane. Set the filter to is = 1.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.- v-kpoloju-msft1 year agoCommunity Support
Hi Mera9,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.