Forum Discussion
Anonymous
6 years agoNot applicable
Replicate excel formula - recursive substraction
Hi there. I am trying to replicate excel formula in power BI DAX. I have date column(A) with date, progress column(B) with integer, left column(C) with integer. This meant to be project progress moni...
- 6 years agoYou can do this by calculating a running total or cumulative sum. Then just do 100000- running total.
So for your example:
Remaining instances = 100000- SUMX(FILTER(ALL(Table), Table[Date] >= EARLIER(Table[Date]) ), Table[left])
AllisonKennedy
Community Champion
6 years agoYou can do this by calculating a running total or cumulative sum. Then just do 100000- running total.
So for your example:
Remaining instances = 100000- SUMX(FILTER(ALL(Table), Table[Date] >= EARLIER(Table[Date]) ), Table[left])
So for your example:
Remaining instances = 100000- SUMX(FILTER(ALL(Table), Table[Date] >= EARLIER(Table[Date]) ), Table[left])
Anonymous
6 years agoNot applicable
Thanks a lot! That was exactly what i was needing. I only changed
aggregate_instances_by_date[last_updated] >= EARLIER(aggregate_instances_by_date[last_updated] to:
aggregate_instances_by_date[last_updated] <= EARLIER(aggregate_instances_by_date[last_updated]
so it is the right chronological way