Forum Discussion

Hoszi's avatar
Hoszi
Frequent Visitor
6 years ago
Solved

Calculate row diffence within a table with DAX

Hi,   I'd like to write a DAX code for the column Difference (see the method in calculate) within a table, using row filtering. I try with DAX function EARLIER, FILTER, DATEADD, but I couldn't find...
  • Hoszi's avatar
    6 years ago

    Finally, I find the good calculation.

     

    DailyChange = 
    VAR Yesterday = DATEADD(Table[Date]; -1; DAY)
    RETURN
        Table[Count (A)] - 
        CALCULATE(
            MAXX(Table;Table[Count(A)]);      
            Table[Date] <= Yesterday
        )