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
Good morning,
I’ve been struggling for one DAX solution I can’t figure out how to write it.
I’m trying to find the latest purchase price based on the salesdate so I can calculate the Margin of a product on a given date.
I'm getting close with:
As you see, the Purchase_Price_Calculated on 31-jan should be 49, however it's showing 56. It's not giving the last date in the filter.
I'm missing the final piece in this puzzle.
Any help will be appreciated.
Michel
Solved! Go to Solution.
I was able to solve it myself with the following code:
I was able to solve it myself with the following code:
HI
Try this
Hi Semja,
Unfortunatly both solutions give the same wrong result.
Regards
Michel
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 |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |