Forum Discussion
errepinna
Helper I
5 years agoSum between specific values
Hello guys, I started to experiment with Power Bi yesterday. Got a lot to learn. Here's my problem: How do I add a column ∆ in a table from the Query Editor? The screen is from an Excel ...
- 5 years ago
errepinna , something like this
new column =
var _last = maxx(filter(Table, [DATE] < earlier([DATE])),[DATE])
return
if(isblank(_last), blank(), [TotalMoney]- maxx(filter(Table, [DATE] =_last ),[TotalMoney]))
errepinna
Helper I
5 years agoThis works! Only one thing: the first raw displays the original value of [TotalMoney]. Is there a way to make it go to zero? I was thinking about putting a condition on the value of _last but I couldn't make it work.
amitchandak
Super User
5 years agoerrepinna , something like this
new column =
var _last = maxx(filter(Table, [DATE] < earlier([DATE])),[DATE])
return
if(isblank(_last), blank(), [TotalMoney]- maxx(filter(Table, [DATE] =_last ),[TotalMoney]))