Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Formular for Delta-value - Opposite to ´EARLIER´

Hi,   How would I design the calculation to have the same results - but displayed at the RED ARROW instead of at the RED BOX?   Current code:       Delta Data = '4_DataLog'[Data] - CALCULAT...
  • v-robertq-msft's avatar
    5 years ago

    Hi, Anonymous 

    According to your description and picture, I guess you want to make each value of [Delta Data] move to the last row of this column, you can try this measure:

    Delta Data =
    
    var _nextvalue=
    
    CALCULATE(SUM('4_DataLog'[Data]),FILTER('4_DataLog',[Indeks]=EARLIER('4_DataLog'[Indeks.1])))
    
    var _data=
    
    _nextvalue-[Data]
    
    return IF(_nextvalue=BLANK(),BLANK(),_data)

    And you can get what you want, like this:

     

    You can download my test pbix file here

     

    Best Regards,

    Community Support Team _Robert Qin

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