Forum Discussion

gauravnarchal's avatar
gauravnarchal
Icon for Post Prodigy rankPost Prodigy
6 years ago

Top N + Others

What is the simplest way to get TOP N + Other sales figure in Power BI.

 

Can this be handled by filters?

 

8 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    if you intend to obtain two tables such that in the first there are the first n largest values and in the second the others, you can do so:

     

     tabSort=Table.Sort(Source,{{"sales", Order.Descending}})
    TopN = Table. FirstN (tabSort, N),
    others = Table.Skip (tabSort, N)

    • gauravnarchal's avatar
      gauravnarchal
      Icon for Post Prodigy rankPost Prodigy

      Is there a better way that you can advise to handle this requirement?

       

      Can filters help to get top N + Other?

      • Anonymous's avatar
        Anonymous
        Not applicable

        I know of other ways of achieving the same result.
        If this is what you want, you should define more precisely what you mean by "better way".
        Do you use less memory?
        It's faster?
        Do you use a single expression?
        Other!?