Forum Discussion
afaque03
9 years agoHelper I
Slicer reverse selection in chart
Hi Friends, I have a double line chart and a year slicer with values 2012, 2013 and 2014 I want a reverse selection in this chart such that when I select 2012 the chart data should display the to...
- 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
OwenAuger
9 years agoSuper User
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] ) )
)