Forum Discussion
Anonymous
3 years agoNot applicable
Creating an Updating Variable
Hello, I am trying to create a column that subtractrs from the previous calculated number (similar to an updating variable). I am getting confused on the DAX code. Currently I have tried this b...
Anonymous
3 years agoNot applicable
Hi,
I have tried this DAX instead, however, I keep getting an error with my index column I created in queary editory.
Improvements =
DDBB[Total Column]
- SUMX (
FILTER (
DDBB,
DDBB[Index]< EARLIER(DDBB[Index])
),
DDBB[Current Improvement1]
)
Thanks!
Greg_Deckler
3 years agoCommunity Champion
Anonymous Try:
Improvements =
SUM(DDBB[Total RPN Column])
- SUMX (
FILTER (
DDBB,
DDBB[Index]< EARLIER(DDBB[Index])
),
DDBB[Current Improvement1]
)
or maybe:
Improvements =
VAR __Index = MAX(DDBB[Index])
RETURN
SUM(DDBB[Total RPN Column])
- SUMX (
FILTER (
ALL(DDBB),
DDBB[Index]< __Index)
),
DDBB[Current Improvement1]
)