Forum Discussion
Slicer reverse selection in chart
- 9 years ago
Hi afaque03,
In your scenario, please create another table (Table2) contains the column Year value, assume the sample data like below:
Make sure there is no relationship between these two tables.
Then create a measure within Table2 like below:
Select Value = IF(HASONEVALUE(Table2[Year]),VALUES('Table2'[Year]),BLANK())
Create a measure in Table1 like below:
Total = CALCULATE(SUM(Table1[Sales]),FILTER('Table1','Table1'[Year]<>'Table2'[Select Value]))
Then place the Year column from Table2 in a slicer visual, Place measure 'Total' as line chart value. See:
Best Regards,
Qiuyun Yu
Another pattern I like to use to invert a selection uses the EXCEPT function (and can handle multiple selection):
=
CALCULATE (
[Your measure],
EXCEPT ( ALL ( YourTable[Year] ), VALUES ( YourTable[Year] ) )
)
Fantastic response OwenAuger. If this were my question I would ave given this the solution tag. I have applied this to multiple uses, such as Customer XYZ vs. All less Customer XYZ
Thank you!!
- amnadeem19918 years agoHelper IHi, OwenAuger shared a fantastic idea, however I was unfortunately unable to interpret it properly into use case. Please can you share this in detail (with some demo example of power BI) where Multiple Reverse selections are possible. Thanks.