Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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]))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
12 | |
9 | |
9 | |
9 |
User | Count |
---|---|
21 | |
14 | |
14 | |
13 | |
13 |