Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Power BI % change based on columns.

I am new to power bi and am slowly learning as I go. 

 

I have several columns brought into power BI.

 

Eg.

 

2020 Vol, 2019 Vol, Vol Variance.

 

I want to show the absolute volume variance which is what I see, but I also want to be able to divide it into the base year to show a percentage change vs the prior year.  I believe I want to do this by adding a column but I have not yet mastered the language to get it to do what I need.

 

Can you help.  

 

 

  • dax's avatar
    dax
    6 years ago

    Hi Anonymous , 

    You could refer to my sample for details

    Best Regards,
    Zoe Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

6 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Anonymous Not entirely certain, but perhaps:

     

    New Column = DIVIDE([2020 Vol] - [2019 Vol], [2019 Vol])

    or perhaps just

    New Column = DIVIDE([2020 Vol], [2019 Vol])​

    If none of that helps, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

    The most important parts are:
    1. Sample data as text, use the table tool in the editing bar
    2. Expected output from sample data
    3. Explanation in words of how to get from 1. to 2.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Greg, thanks for trying to help.

       

      That didnt seem to work.  What I would do normally in excel is divide the var - eg 1,729 into the base volume of 7,825 and it would give me 22% as the change.  

       

      2020 Volume 2019 Volume Var% Change
      6096                      7,825                     (1,729)-22%
      4242                      4,470                         (228)-5%
      • dax's avatar
        dax
        Icon for Community Support rankCommunity Support

        Hi Anonymous , 

        You could try below measure

        Measure 2 = ABS(DIVIDE(MIN('Table'[2020 Volume])-MIN('Table'[ 2019 Volume ]),MIN('Table'[ 2019 Volume ])))

         

        Best Regards,
        Zoe Zhi

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.