Forum Discussion
Invert values in a visual?
- 5 years ago
you can create a calculation group item in tabular editor, and then use that item, which is a measure to apply to all the measures in your model, by use of a slicer you apply the calculation group measure to your measure it and you can get the inverse, but it obviously depends on how you want to use it.
see pbix example, but you will need tabular editor to see the calculation item
https://www.sqlbi.com/tools/tabular-editor/ --> download tabular editor if you haven't already, its awesome
watch this video with the details on how to use create the calculation group https://www.youtube.com/watch?v=xS1t25_GsWw
i think you can probably use this code for your calculation item. depending on how you use it.
selectedmeasure() * -1
you can create a calculation group item in tabular editor, and then use that item, which is a measure to apply to all the measures in your model, by use of a slicer you apply the calculation group measure to your measure it and you can get the inverse, but it obviously depends on how you want to use it.
see pbix example, but you will need tabular editor to see the calculation item
https://www.sqlbi.com/tools/tabular-editor/ --> download tabular editor if you haven't already, its awesome
watch this video with the details on how to use create the calculation group https://www.youtube.com/watch?v=xS1t25_GsWw
i think you can probably use this code for your calculation item. depending on how you use it.
selectedmeasure() * -1
I was looking at calculation groups yesterday for using actual, budget, forecast measures to YTD, LYTD, Last year calculated groups, but as i understood that wont work if i want to show lets say actual YTD; LYTD vs budget this year.
But i will look into using calculated groups for inverting data, thank you.