Forum Discussion

Wael03's avatar
Wael03
Helper I
3 years ago
Solved

Aggregate rows in a table

Hello,

 

I have a dataset displaying the name of a company, his total amount of transactions, and the total count of transaction as you can see here : 

In total I have more than a hundred rows, what I would like to do is to display the first 20 rows in the table and aggregate all the other rows as "others" by summing the tran amount and sum tran amount. 

Do you know how I could do that ? 

Thank you in advance !

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Wael03 ,

     

    You may try to add a top n filter in Power BI.

    Please kindly refer to

    Add a top or bottom n records filter in Microsoft Power BI | TechRepublic

    If you also want the bottom row to display the other, you need to create a separate table with the sorted numbers and "other", and then display the results with a SWITCH function to match them.

                                                                                                                                                             

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Wael03 ,

     

    You may try to add a top n filter in Power BI.

    Please kindly refer to

    Add a top or bottom n records filter in Microsoft Power BI | TechRepublic

    If you also want the bottom row to display the other, you need to create a separate table with the sorted numbers and "other", and then display the results with a SWITCH function to match them.

                                                                                                                                                             

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.