Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

288
Views
How do one group index number by a custom category in powerquery

How can one group index number by a custom category in this image show below. The challenge is on the left section, while the expected output is shown by an arrow at the right section. I want for for every ID that has row containing G-TAN, should have a seperate index number, so also K-TAN, M-TAN according to this format as shown in the image below:

https://ibb.co/kghq3Bp

enter image description here

Thank you.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

try

let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"FIKA"}, {{"Count", each _, type table}}),
#"Added Index" = Table.AddIndexColumn(#"Grouped Rows", "Index", 1001, 1000, Int64.Type),
#"Added Custom" = Table.AddColumn(#"Added Index", "Custom", each Table.AddIndexColumn([Count],"ID2", [Index], 1, Int64.Type)),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Count", "Index"}),
#"Expanded Custom" = Table.ExpandTableColumn(#"Removed Columns", "Custom", {"DOSE", "UNIT", "QTY", "ID2"}, {"DOSE", "UNIT", "QTY", "ID2"}),
#"Renamed Columns" = Table.RenameColumns(#"Expanded Custom",{{"ID2", "ID"}})
in  #"Renamed Columns"

enter image description here

ID FIKA DOSE UNIT QTY
1 G 3 1 2
2 G 2 1 5
3 G 1 1 2
4 G 2 1 3
5 K 1 1 5
6 K 2 1 2
7 K 1 1 5
8 M 3 1 2
9 M 1 1 2
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!