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!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
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.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 15 | |
| 14 | |
| 9 | |
| 8 | |
| 7 |