Forum Discussion
Filter Data with Mandatory values
- 6 years ago
Hi, sjehanzeb
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:You may create a measure as below.
Visual Control = var _jid = SELECTEDVALUE('Table'[J ID]) return IF( COUNTROWS( FILTER( ALL('Table'), 'Table'[J ID]=_jid&& 'Table'[Account]="Cash" ) )>0&& COUNTROWS( FILTER( ALL('Table'), 'Table'[J ID]=_jid&& 'Table'[Account]="Payable" ) )>0, 1,0 )Finally you need to put the measure in the visual level filter to display the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, sjehanzeb
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure as below.
Visual Control =
var _jid = SELECTEDVALUE('Table'[J ID])
return
IF(
COUNTROWS(
FILTER(
ALL('Table'),
'Table'[J ID]=_jid&&
'Table'[Account]="Cash"
)
)>0&&
COUNTROWS(
FILTER(
ALL('Table'),
'Table'[J ID]=_jid&&
'Table'[Account]="Payable"
)
)>0,
1,0
)
Finally you need to put the measure in the visual level filter to display the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.