Forum Discussion
Hoszi
6 years agoFrequent Visitor
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...
- 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 )
Hoszi
6 years agoFrequent Visitor
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
)