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! Learn more
Hello, I need to write a formula in dax that will calculate a date from a list of dates from a table. The formulas are supposed to take into account the product id filter:
1. the first function is to calculate the maximum date, maximum -1, maximum -2 so that I can choose the appropriate string value
2. the second function is to return a specific value from the row with the calculated date and product id, e.g. quantity.
Regards
Sebastian
I guess I failed to check I have a list of dates.
In this list, the maximum date is 24/04/2023.
However, I want to be able to calculate the next e.g.
22/04/2023 (max-1) and another 17/04/2023 (max-2), i.e. subsequent dates in a decreasing sequence. The function must include a filter for a specific product id.
At the same time, the result of this function is supposed to be a filter to find other values from a table row.
e.g.
date 22/04.2023 for product id 25, is to be a filter to the sales quantity for a given date and product id.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Hi @s_kula ,
Very sorry, due to my unintelligence hope you can provide more information.
Why are -1 and -2 both maximum?How many tables are there in the calculations?Could you please provide more details?
How to Get Your Question Answered Quickly
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 9 | |
| 9 | |
| 8 |