Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I´m trying to calculate the last value of every ID KPI (with a measure), as I showed it in the picture:
I mean, the last value is the value of the previos date, for every ID KPI, so I try to have that result:
¿ How can I do this?
I tried to do that searching firstly the max of the date and then trying to find the max of other dates:
= maxx (filter ('Medición KPIS', 'Medición KPIS'[Date] <> max ('Medición KPIS'[Date])), 'Medición KPIS'[Date])
But it didn´t work.
Is other way to do that?
Thank you a lot.
Solved! Go to Solution.
@ania_roh , Create a new column like
new column =
var _max = maxx(filter(Table, [date]<earlier([Date]) && [ID KPI] =earlier([ID KPI])),[Date])
return
maxx(filter(Table, [date] =_max && [ID KPI] =earlier([ID KPI])),[value])
Sorry @amitachandak I put it wrong, it was my mistake. I really appreciate your help, thank you a lot. It really works!
I put it as a solution.
@ania_roh you can use this function .
@Anonymous thank you for your reply but the period is diffent, it is sometimes three month, sometimes 6 month, it depends on KPI and of what day people put the date into excel, so it doesn´t work in this case, because it is variable always.
@ania_roh , Create a new column like
new column =
var _max = maxx(filter(Table, [date]<earlier([Date]) && [ID KPI] =earlier([ID KPI])),[Date])
return
maxx(filter(Table, [date] =_max && [ID KPI] =earlier([ID KPI])),[value])
@amitchandak could you please repeat the part after return...
I have a error in that part, but I don´t know why.
Thank you a lot.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 17 | |
| 14 | |
| 13 |