Forum Discussion
Customized filter behavior with button/slicer etc
- 6 years ago
You could do this by creating a disconnected table with single column with 2 values "YES" and "NO"
Then you could create a measure like the following
Total Amount = VAR _includeBonus = SELECTEDVALUE('Include Bonus'[Include Bonus]) RETURN IF(_includeBonus = "NO", CALCULATE( SUM('Table'[Amount]), KEEPFILTERS('Table'[Bonus] = "NO")), SUM('Table'[Amount]))I've attached a copy of my test file to this post if you are interested.
One question similar to this.
What if 'Include Bonus' Slicer has 10 different values and enabled for selecting multiple values.
in this case how do I check if only 'Yes' is selected.
Anonymous wrote:
One question similar to this.
What if 'Include Bonus' Slicer has 10 different values and enabled for selecting multiple values.
in this case how do I check if only 'Yes' is selected.
The SELECTEDVALUE() function only returns a value if there is a single selection. If there is no selection or multiple selections it will return blank by default or you can add an optional second parameter to indicate the value you want returned in the case where there is no a single selection.