Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Calculate %-difference between two data points in different series

Hi,

I have two measures with one data point in each and I want to calculate the %-difference between these in a card, how can I do that correctly? 

The formulas for the measures are as follows:

Quantity Last Period = CALCULATE([Stock];FILTER('Dash Solid test table';'Dash Solid test table'[Date]=DATE(2020;03;20)))
Current Quantity = CALCULATE([Stock forecast]; FILTER('Dash Solid test table';'Dash Solid test table'[Date]=DATE(2020;04;10)))
 

So I would want a card saying "-25%" in this case (ie (6-8)/8=-0,25)

 

I also wonder how I can change the format of the date in the chart? It does not format as in the source table. 

 

 

  • Anonymous 

    One if the two


    Difference % = divide([Quantity Last Period] - [Current Quantity]) , [Current Quantity])
    Difference % = divide([Quantity Last Period] , [Current Quantity]) -1

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion
    So like:

    Percent Difference = ([Quantity Last Period] - [Current Quantity]) / [Current Quantity]

    ?
  • Anonymous 

    One if the two


    Difference % = divide([Quantity Last Period] - [Current Quantity]) , [Current Quantity])
    Difference % = divide([Quantity Last Period] , [Current Quantity]) -1

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Check if the reply above solved you first question. And for you second question, you can select the column then find the Format feature under Modeling pane.

     

    Best Regards,

    Jay

     

    Community Support Team _ Jay Wang

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