Forum Discussion
remove rows in a table based on a condition.
I have a table imported into power BI (sample below) i want to be able to filter either the table or when i create a visual that will only show me the row with the highest Transaction Id, in this example it would be the first rows. I do not want to see the other rows as the total invoice amount is the same. In esscence it is the same transaction but has gone through a series of workflows, so i only want to see the one with the higher Transaction Id, all transaction ids are a unique number. The table has thousands of lines with multiple invoice Ids the same or just one line, any ideas how i can resolve this. sorry but it wont let me upload the xls table
| Date | Account no | Invoice id | Transaction id | invoice number | department | cost centre no | cost centre description | supplier name | supplier site code | invoice header description | total invoice amount | transaction type | po number | account code description |
| 3/4/2023 | 5224102064 | 104998736 | 10499873641 | AB12345 | DP1 | 10254000 | WFLC | A Supplier LTD | ABC123 | Desc | 3,991.37 | Non-PO | Other fees | |
3/4/2023 | 5224102064 | 104998736 | 10499873631 | AB12345 | DP1 | 10254000 | WFLC | A Supplier LTD | ABC123 | Desc | 3,991.37 | Non-PO | Other fees | |
3/4/2023 | 5224100011 | 104998736 | 10499873611 | AB12345 | DP1 | 10254000 | WFLC | A Supplier LTD | ABC123 | Another description | 3991.37 | Non-PO | Pending Allocation |
1 Reply
- Dangar332
Resident Rockstar
Hi, NeilJustice
You can try to make new table
Addcolumn ('yourtable',"hightranid", calculate (maxx ( filter ('yourtable','yourtable'[Invoice id]), 'yourtable'[Transaction id])))
You can make new measure which use instead of transaction Id column
New measure=
maxx ( filter ('yourtable','yourtable'[Invoice id]), 'yourtable'[Transaction id])
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.