Forum Discussion
Adjust values based on slicer state
- 7 years ago
Hi Anonymous
You may create a measure like below and use it for the datetime visual.
Measure 2 = SUMX(FILTER(Table2,Table2[datetime]=MAX(Table2[datetime])),[invert])
Regards,
Cherie
Thank you. But it doesnt seem to work like i want yet.
In the example pbix you attached;
* if i select no location (ie all values should be original) then all values are * -1. it does work correctly if one or more locations are selected. i managed to fix this myself by putting your code into an IF ISFILTERED
* if i make a column chart with "datetime" on the axis, and "invert" on the values, then it does not behave like i expected. this chart is the ultimate goal of my report. i guess that is because location is not in the chart? is there a way around this?
Bonus question:
The slicer table does not seem to respond to filters. Is that possible? What if there was more data and because of an (external) filter there were less locations?
Hi Anonymous
You may create a measure like below and use it for the datetime visual.
Measure 2 = SUMX(FILTER(Table2,Table2[datetime]=MAX(Table2[datetime])),[invert])
Regards,
Cherie
- Anonymous7 years agoNot applicable
Fantastic it works thank you. Can you please explain the last measure?
SUMX(FILTER(Table2,Table2[datetime]=MAX(Table2[datetime])),[invert])