Forum Discussion

Mjolnir's avatar
Mjolnir
Helper I
2 years ago

Visual calculation - Subtract one value column with another

Hi,

 

I would like a column in the matrix below to display the difference between the red and blue marked value columns. 

I want to subtract "Budget" with "Utfall" but it seems like visual calculations does not support this, though not sure if there is a way. I guess it has to do with the fact that both scenarios "Budget/Utfall" derive from the same value column "Belopp".

 

Any ideas on how to solve this?

 

 

 

4 Replies

  • some_bih's avatar
    some_bih
    Community Champion

    Hi Mjolnir just put new columns, beside yours two, and provide calculation logic.

    check link for example

    • Mjolnir's avatar
      Mjolnir
      Helper I

      some_bih I am totaly new to Power BI, therefor - wondering if you mean adding new columns to the visual or the table and data used to generate the visual? I can't find any function adding columns to the visual. Did'nt manage to solve the issue using your example.

       

      Both "Budget" and "Utfall" are recorded under the attribute "Scenario" and their values presented by another column "Belopp".

  • some_bih's avatar
    some_bih
    Community Champion

    Hi Mjolnir for visual calculation, all input columns for your calculation should be add to your visual.

    For part  I can't find any function adding columns to the visual 

    Put columns which are your inputs columns in visual, then go to Home, select visual and in part "Calculation" name "New calculation" should be visible (beside New measure and Quick measure) 

    then go to this "New calculation" and in your window you will get 

    Calculation = 
    and type your columns with calculation logic (you can rename calculation)

     

    • Mjolnir's avatar
      Mjolnir
      Helper I

      Thank you guys!

       

      I solved the issue creating new measures and added those to the column field and it did the job. Hope to see an easier way of doing this looking forward. I miss a lot of the simplicity found in excel in some cases.