Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Robert14358
Resolver III
Resolver III

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}
}
)

1 ACCEPTED SOLUTION
SivaMani
Resident Rockstar
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!

View solution in original post

2 REPLIES 2
SivaMani
Resident Rockstar
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!

hmm okay, i wanted 1 step though 😞

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors