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! Get ahead of the game and start preparing now! Learn more
Hello,
I have a dataset where I am getting multiple rows for a combination of attributes for different dates. I want to filter the rows based on maximum date for the selected attributes. Here is the dataset example and what I am looking for.
| TestName | Metric | LatestBatch | WeekID | Source Value | Target Value | Execution Date |
| Test1 | A | 202007231120 | w192005 | 0 | 10000 | 23/07/2020 |
| Test1 | A | 202008051029 | w192005 | 300 | 310 | 03/08/2020 |
| Test1 | A | 202007291135 | w192005 | 2400 | 200 | 29/07/2020 |
Expected Output:-
Flag is the column I want in dataset and it would be great if this can come through a measure rather than calculated column.
| TestName | Metric | LatestBatch | WeekID | Source Value | Target Value | Execution Date | Flag |
| Test1 | A | 202007231120 | w192005 | 0 | 10000 | 23/07/2020 | 0 |
| Test1 | A | 202008051029 | w192005 | 300 | 310 | 03/08/2020 | 1 |
| Test1 | A | 202007291135 | w192005 | 2400 | 200 | 29/07/2020 | 0 |
Thanks.
@Anonymous , on what bases Date needs to be selected is not clear. Can you please explain with an example.
See example
if(Max(Table[Execution])= calculate(max(Table[Execution]), allexcept(Table[TestName])), "Yes","No")
Appreciate your Kudos.
Can you please modify this to All instead of AllExcept. I have added this to report but it looks like it is working on the remaining grouping except TestName & WeekID while I want it to work only for this grouping. Adding any more attributes in the grid should not change the result. When I try All in the same formula, I get an error - "Multiple table arguments are not allowed in the ALL/ALLNOBLANKROW function."
Thanks for quick reply, I will try it out.
I need the grouping on TestName and WeekID and find max Execution Date rows.
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 |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |