Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello all,
I would like to filter the table below based on the higher value in the Order ID for each row where the Unique ID is matching.
The table below represents a history that's why there is the same Unique ID for rows, however, the higher value of Order ID means that it's the latest output.
AA ID | DB ID | Status | Order ID | Unique ID |
1111 | 2222 | Failed | 100 | 123456 |
1111 | 2222 | Finished | 101 | 123456 |
2222 | 3333 | Exception | 110 | 234567 |
2222 | 3333 | Rescan | 111 | 234567 |
2222 | 3333 | Finished | 112 | 234567 |
3333 | 1234 | Exception | 120 | 987654 |
As an output table from the example above I would have:
AA ID | DB ID | Status | Order ID | Unique ID |
1111 | 2222 | Finished | 101 | 123456 |
2222 | 3333 | Finished | 112 | 234567 |
3333 | 1234 | Exception | 120 | 987654 |
Thanks for your help!
Solved! Go to Solution.
@Anonymous
Create a new table with the following filter:
Filtered Order Table =
FILTER(
Table2,
var __maxorder = CALCULATE( MAX(Table2[Order ID]) , ALLEXCEPT( Table2 , Table2[AA ID] )) return
Table2[Order ID] = __maxorder
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Anonymous
Create a new table with the following filter:
Filtered Order Table =
FILTER(
Table2,
var __maxorder = CALCULATE( MAX(Table2[Order ID]) , ALLEXCEPT( Table2 , Table2[AA ID] )) return
Table2[Order ID] = __maxorder
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Thank you, that works perfectly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
10 | |
8 | |
7 |
User | Count |
---|---|
17 | |
13 | |
7 | |
6 | |
6 |