Forum Discussion
Visual filter by Measure or maybe Conditional filter
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.
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.
- v-kpoloju-msft1 year agoCommunity Support
Hi Mera9,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.- v-kpoloju-msft1 year agoCommunity Support
Hi Mera9,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.