Forum Discussion
Power BI slicer OR condition
- Anonymous6 years ago
Hi Ethanhunt123,
AFAIK, power bi use 'AND' logic to link all filters. If you want to achieve 'OR' logic, please use unconnected tables fields as the source of slicers. After these, you can extract current row contents to compare with combined selection ranges to return tag. Then you can apply this measure on your visual to filter records.
Measure = IF ( SELECTEDVALUE ( table[Column] ) IN UNION ( ALLSELECTED ( Col1[Column] ), ALLSELECTED ( Col2[Column] ) ), "Y", "N" )If above not helps, please share some dummy data with the expected result to help us clarify you scenario and test coding formula on it.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hi Ethanhunt123,
AFAIK, power bi use 'AND' logic to link all filters. If you want to achieve 'OR' logic, please use unconnected tables fields as the source of slicers. After these, you can extract current row contents to compare with combined selection ranges to return tag. Then you can apply this measure on your visual to filter records.
Measure =
IF (
SELECTEDVALUE ( table[Column] )
IN UNION ( ALLSELECTED ( Col1[Column] ), ALLSELECTED ( Col2[Column] ) ),
"Y",
"N"
)
If above not helps, please share some dummy data with the expected result to help us clarify you scenario and test coding formula on it.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng