Forum Discussion

Robert14358's avatar
Robert14358
Resolver III
3 years ago
Solved

Groupby with IF statement

Hello All.

 

I cant seem to get this to work:

= Table.Group(#"Changed Type", {"Block_ID"},
{
{"Children", each Text.Combine(each if [Block_type] = "Block" then [Block_Name_Child] else null, " | "), type text}
}
)

  • Robert14358, You can have it in 2 steps.

    1. Create a custom column with the if else condition
    2. Use the custom column in the group by

    Share sample data and expected output for the right solution!

2 Replies

  • SivaMani's avatar
    SivaMani
    Resident Rockstar

    Robert14358, You can have it in 2 steps.

    1. Create a custom column with the if else condition
    2. Use the custom column in the group by

    Share sample data and expected output for the right solution!