Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I'm trying to calculate the corresponding price for the latest date in another column.
In this example each group has few items, each item has its own purchase date and price.
My goal is to calculate for each group the latest date and the corresponding price
(Which is not the max price for the group)
Any suggestions, please?
The source table and the desired result:
| Group | Item Code | Item Purchase Date | Item Price |
| A | 111 | 15/01/2019 | 200 |
| A | 112 | 15/02/2019 | 180 |
| A | 113 | 15/03/2019 | 150 |
| B | 211 | 10/02/2018 | 180 |
| B | 212 | 10/03/2018 | 120 |
| B | 213 | 10/04/2018 | 140 |
| Group | Max Purchase Date | Item Price |
| A | 15/03/2019 | 150 |
| B | 10/04/2018 | 140 |
Solved! Go to Solution.
Hi!
You can create a measure for the latest price and do without a measure for the latest date by using a variable instead, as suggested here:
https://community.powerbi.com/t5/Desktop/Needing-a-measure-for-last-sales-price/td-p/228280
Latest Price =
Hi!
You can create a measure for the latest price and do without a measure for the latest date by using a variable instead, as suggested here:
https://community.powerbi.com/t5/Desktop/Needing-a-measure-for-last-sales-price/td-p/228280
Latest Price =
Thanks, it works!
this works also:
price of max date =
CALCULATE(
MIN(table[Item Price]),
FILTER(table,table[Item Purchase Date] = MAX(table[Item Purchase Date]))
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 |
|---|---|
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 21 | |
| 10 | |
| 8 | |
| 8 |