Forum Discussion

Alta88's avatar
Alta88
Icon for Helper IV rankHelper IV
2 years ago

Showing Top 3 Records from 2 Groups

How do I display the top 3 records of these project IDs from two general project size groups (Large vs. Small)?

 

Project Size GroupID
Large1
Large8
Large25
Large77
Large81
Large98
Large100
Large127
Large162
Large190
Large191
Large204
Large214
Large216
Small57
Small165
Small174
Small188
Small189
Small193
Small201
Small202
Small208
Small209
Small210
Small212
Small215
Small217
Small218
Small219
Small220

3 Replies

  • you can try to add a new column in pq

     

    = Table.AddColumn(#"Changed Type1","Rank",each Table.RowCount(Table.SelectRows(#"Changed Type1",(x)=>x[Project Size Group]=[Project Size Group] and x[ID]>[ID]))+1)

     

     

    then you can filter the new column to get top3

  • Great! I got the new column in; I'm a bit lost in terms of how to filter to get the top3, though. Do I do this in the Filters section? 

     

     

    • ryan_mayu's avatar
      ryan_mayu
      Icon for Super User rankSuper User

      you can do this in the visual filter. and you can also do this in the PQ, then only top 3 will show in your table.