Forum Discussion
Anonymous
6 years agoNot applicable
Filter out only some rows
My data has a column with one of 3 values - say A, B & C. I want a table that always displays rows with A or B and a slicer that selects whether C rows are displayed. So: Slicer ticked: Displ...
- 6 years ago
Hi Anonymous ,
You could try to create a new irrelated table as a slicer. I created a simple sample that you can reference.
- Create a new table munally
- Create a measure
Measure = var A_B = CALCULATE(SUM('Table 1'[Values]),FILTER('Table 1','Table 1'[Items] = "A" || 'Table 1'[Items] = "B")) var C = CALCULATE(SUM('Table 1'[Values]),FILTER('Table 1','Table 1'[Items] = "C")) return IF(ISFILTERED('Table'[Filter Table]),C,A_B)Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-xuding-msft
6 years agoCommunity Support
Hi Anonymous ,
You could try to create a new irrelated table as a slicer. I created a simple sample that you can reference.
- Create a new table munally
- Create a measure
Measure =
var A_B = CALCULATE(SUM('Table 1'[Values]),FILTER('Table 1','Table 1'[Items] = "A" || 'Table 1'[Items] = "B"))
var C = CALCULATE(SUM('Table 1'[Values]),FILTER('Table 1','Table 1'[Items] = "C"))
return
IF(ISFILTERED('Table'[Filter Table]),C,A_B)
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
6 years agoNot applicable
That's wonderful v-xuding-msft.
It doesn't do exactly as I was asking for, but with a small amendment it works great.
I changed the Measure to:
Measure =
var A_B = CALCULATE(SUM('Table 1'[Values]),FILTER('Table 1','Table 1'[Items] = "A" || 'Table 1'[Items] = "B" ))
var ABC = CALCULATE(SUM('Table 1'[Values]))
return
IF(ISFILTERED('Table'[Filter Table]),ABC,A_B)
Thanks
MB