Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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]))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
95 | |
80 | |
74 | |
66 |
User | Count |
---|---|
130 | |
106 | |
105 | |
86 | |
72 |