Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
BRCODECIF
| 1221 | 1 |
| 518 | 2 |
| 523 | 3 |
| 525 | 4 |
| 1221 | 5 |
| 4756 | 6 |
| 518 | 7 |
| 518 | 8 |
| 518 | 9 |
| 525 | 10 |
| 525 | 11 |
| 525 | 12 |
| 525 | 13 |
| 1221 | 14 |
| 1221 | 15 |
| 4756 | 16 |
| 475 | 17 |
| 4756 | 18 |
| 4756 | 19 |
In the above list i want dynamically to select first two cell from each distinct value in brcode like
brcode cif
1221 1
1221 5
518 2
518 7.
I tried List.FirstN after grouping but it is giving error. Please hep
Solved! Go to Solution.
NewStep=Table.Combine(Table.Group(PreviousStepName,"BRCODE",{"n",each Table.FirstN(_,2)})[n])
Hi Daniel... it worked. Many thanks for your accurate and prompt reply
NewStep=Table.Combine(Table.Group(PreviousStepName,"BRCODE",{"n",each Table.FirstN(_,2)})[n])
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!