Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi there,
I have to use DAX to do this:
For Each Group of Material (first column) I want to calculate the difference of the price compared to previous row.
I tried to find a solution that is there but only found ways to do it without the partition of material (first column).
Thanks a lot
@hony , Try a new column like
New column =
var _max = maxx(filter(Table, [Material] = earlier([Material]) && [Date_eop] < earlier([Date_eop])), [Date_eop])
var _price =maxx(filter(Table, [Material] = earlier([Material]) && [Date_eop] < =_max), [price])
return
divide([price] -_price,_price)
User | Count |
---|---|
73 | |
69 | |
35 | |
27 | |
26 |
User | Count |
---|---|
96 | |
92 | |
54 | |
45 | |
41 |