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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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]))