Forum Discussion

NeilJustice's avatar
NeilJustice
Frequent Visitor
2 years ago

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 

 

 

 

 

 

 

 

 

DateAccount noInvoice idTransaction idinvoice numberdepartmentcost centre nocost centre descriptionsupplier namesupplier site codeinvoice header descriptiontotal invoice amounttransaction typepo numberaccount code description
3/4/2023522410206410499873610499873641AB12345DP110254000WFLCA Supplier LTDABC123Desc3,991.37Non-PO Other fees

3/4/2023

522410206410499873610499873631AB12345DP110254000WFLCA Supplier LTDABC123Desc3,991.37Non-PO 

Other fees

3/4/2023

522410001110499873610499873611AB12345DP110254000WFLCA Supplier LTDABC123Another description3991.37Non-PO 

Pending Allocation

1 Reply

  • Dangar332's avatar
    Dangar332
    Icon for Resident Rockstar rankResident 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.