cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Hanspw
Helper I
Helper I

Invert values in a visual?

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.

1 ACCEPTED SOLUTION
vanessafvg
Super User I
Super User I

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

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
vanessafvg
Super User I
Super User I

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





Did I answer your question? Mark my post as a solution!

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 😐

vanessafvg
Super User I
Super User I

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

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

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.

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors