Forum Discussion
Alta88
Helper IV
2 years agoShowing 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 Group | ID |
| Large | 1 |
| Large | 8 |
| Large | 25 |
| Large | 77 |
| Large | 81 |
| Large | 98 |
| Large | 100 |
| Large | 127 |
| Large | 162 |
| Large | 190 |
| Large | 191 |
| Large | 204 |
| Large | 214 |
| Large | 216 |
| Small | 57 |
| Small | 165 |
| Small | 174 |
| Small | 188 |
| Small | 189 |
| Small | 193 |
| Small | 201 |
| Small | 202 |
| Small | 208 |
| Small | 209 |
| Small | 210 |
| Small | 212 |
| Small | 215 |
| Small | 217 |
| Small | 218 |
| Small | 219 |
| Small | 220 |
3 Replies
- ryan_mayu
Super User
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
- Alta88
Helper IV
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
Super 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.