Forum Discussion

Hanspw's avatar
Hanspw
Helper I
5 years ago
Solved

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 los...
  • vanessafvg's avatar
    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