Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi.
Is it possible to reverse the values in a visual?
My dataset have negative values. Income is negative values, and cost i positive values. That is fine in a cost report, but in a profit loss statement i would like the income to be positive numbers and the costs to be negative values. Also there may be time that you would like to highligt some data in a graph and where invertet numbers makes more sense.
Is there a way to accomplish this by inverting the values in a matrix og graph, or some other way to revert the measures, without duplicating all the measures? (sound like lot of work and could get messy with actual measures, budget measures, forecast measures, and everything in with YTD, LYTD, total this year and total last year measures. I really dont want to duplicate everything.
Solved! Go to Solution.
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
Proud to be a Super User!
i just saw this in linked in but not sure if its of any use to you?
https://www.linkedin.com/posts/daniilmaslyuk_powerbi-activity-6788412485411106816-HaBt
Proud to be a Super User!
Thank you for the tip. I think the calculation groups is what i am looking for, but this could be handy for a quick fix. But i am not able to test it, i cant see this option. Maybe my desktop application is not updated 😐
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
Proud to be a Super User!
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.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
104 | |
98 | |
97 | |
38 | |
37 |
User | Count |
---|---|
152 | |
121 | |
73 | |
71 | |
63 |