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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors