The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
82 | |
77 | |
46 | |
39 |
User | Count |
---|---|
135 | |
109 | |
70 | |
64 | |
55 |