Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I would like a DAX statement that returns the MAX(Date) for each ID only if the Amount=0 for the record with the MAX(Date) value.
End Date = CALCULATE(MAX(SampleData[Date],ALLEXCEPT(SampleData, SampleData[ID])
gets the MAX(Date) for each ID, but obviously doesn't account for the Amount being 0. I am not sure whether I need an IF statement or a FILTER (or both).
Thank you!
SampleData
ID | Date | Amount | End Date |
1 | 2/1/2020 | 500.00 | |
1 | 3/12/2020 | 0.00 | 3/12/2020 |
2 | 1/11/2020 | 300.00 | |
3 | 1/4/2020 | 255.00 | |
3 | 2/15/2020 | 0 | |
3 | 3/22/2020 | 14.00 | |
4 | 1/21/2020 | 51.00 | |
4 | 2/16/2020 | 0 | |
4 | 3/17/2020 | 0 | 3/17/2020 |
Solved! Go to Solution.
Hi @Anonymous ,
Try this code for calculated column:
If you consider it as a solution, please mark as a solution and kudos.
Ricardo
Hi @Anonymous ,
Try this code for calculated column:
If you consider it as a solution, please mark as a solution and kudos.
Ricardo
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
104 | |
77 | |
68 | |
61 |
User | Count |
---|---|
148 | |
107 | |
106 | |
82 | |
70 |