Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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 example I made.
Solved! Go to Solution.
@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 , Try a new column like
new column =
var _last = maxx(filter(Table, [DATE] < earlier([DATE])),[DATE])
return
[TotalMoney]- maxx(filter(Table, [DATE] =_last ),[TotalMoney])
This 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.
@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]))
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |