Forum Discussion
Filtering Table on Measure Value
- Anonymous3 years ago
Hi PowerBi_Xandar ,
Because in your example, dimension 1 and dimension 2 you choose the values of different rows in the same main table. So for the dimension fields of the two slicers, they need to come from two new separate tables.
Two calculated tables:
D1 = DISTINCT('Table'[Dimension 1])D2 = DISTINCT('Table'[Dimension 2])The measure of area can be created like:
Area = SELECTEDVALUE('D1'[Dimension 1])*SELECTEDVALUE('D2'[Dimension 2])At last, create a measure to filter the area column.
IF(ISFILTERED('D1'[Dimension 1])&&ISFILTERED('D2'[Dimension 2]),IF([Area]*1.05>=MAX('Table (2)'[Area column])&&[Area]*0.95<=MAX('Table (2)'[Area column]),1),1)Put it into the visual-level filters, set up show items when the value is 1.
When 21 and 20 are filtered.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi PowerBi_Xandar ,
Because in your example, dimension 1 and dimension 2 you choose the values of different rows in the same main table. So for the dimension fields of the two slicers, they need to come from two new separate tables.
Two calculated tables:
D1 = DISTINCT('Table'[Dimension 1])D2 = DISTINCT('Table'[Dimension 2])
The measure of area can be created like:
Area = SELECTEDVALUE('D1'[Dimension 1])*SELECTEDVALUE('D2'[Dimension 2])
At last, create a measure to filter the area column.
IF(ISFILTERED('D1'[Dimension 1])&&ISFILTERED('D2'[Dimension 2]),IF([Area]*1.05>=MAX('Table (2)'[Area column])&&[Area]*0.95<=MAX('Table (2)'[Area column]),1),1)
Put it into the visual-level filters, set up show items when the value is 1.
When 21 and 20 are filtered.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Stephen,
Thank You for the solution, it works.
I wish power bi fix the What if slicer single value selection issue.