Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Plot "moving difference"

Hello,

 

I would like to plot a function of time in power bi, the x axis being time, and the y axis being the difference between the value at time x and time x-1. Can this be achieved in Power BI ?

 

Thanks,

 

 

  • Hi Anonymous ,

     

    POWER function 

    You can create a measure with "Power()" function and add the measure to the visual.

     

     

     

    Best regards,
    Lionel Chen

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

2 Replies

  • Anonymous , you need use time intelligence or create some measure that will create difference

    example for day

    This Day = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])))
    Last Day = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])-1))
    Last Day = CALCULATE(sum('order'[Qty]), previousday('Date'[Date]))
    diff =[This Day] - [Last Day]

     

    You have to use diff measure

    Day Intelligence - Last day, last non continous day
    https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9

  • v-lionel-msft's avatar
    v-lionel-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    POWER function 

    You can create a measure with "Power()" function and add the measure to the visual.

     

     

     

    Best regards,
    Lionel Chen

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