Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Power query help for creating custom column

 Hi experts,

I need to create a custom column using Power Query in Power BI like below.

Please help

 

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago


    I have created a custom column 'Type' for differentiate self and nominees. And grouped using below query and merged.
    = Table.Group(#"Added Conditional Column", {"EMPLOYEE CODE"},
    {{"AllRows", each
    Table.AddIndexColumn( Table.Sort(_, {{"Type", 1}} ) ,
    "rowindexinsubset" ,1,1 ), type table}})

2 Replies

  • Hello Anonymous ,

     

    Can you specify the conditions that will lead to your output so we could help you?

     

    If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

    Follow me on Linkedin

     

  • Anonymous's avatar
    Anonymous
    Not applicable


    I have created a custom column 'Type' for differentiate self and nominees. And grouped using below query and merged.
    = Table.Group(#"Added Conditional Column", {"EMPLOYEE CODE"},
    {{"AllRows", each
    Table.AddIndexColumn( Table.Sort(_, {{"Type", 1}} ) ,
    "rowindexinsubset" ,1,1 ), type table}})