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

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

Reply
Jiradett
New Member

Need help with grouping and conditional column

I want to group the ID and Name and add a new column based on the status of the end date. The new column would contain the ministry names (in one cell, separate by a comma) if the end date is 'null', but display nothing if no 'null' value showing for each ID at all.

Screenshot 2022-11-03 133139.png

 

The result should be like this 

 

Screenshot 2022-11-03 133632.png

 

I'm not sure what technique should I use with Power Query. Please advice.

2 REPLIES 2
vaibhavkale570
Resolver III
Resolver III

1. FIlter Null values in end date table

vaibhavkale570_0-1667446849907.png

 

 

2. select id and name column and click group by

vaibhavkale570_1-1667446916804.png

 

3. in operation select All Rows and click ok

vaibhavkale570_2-1667446973269.png

 

 

4. go to add column >custom coluumn

add this m code in formula box

=Table.Column([Ministry],"Member.ministries.ministry.name")

 

click ok

 

vaibhavkale570_3-1667447425595.png

 

 

5. click on extract values 

vaibhavkale570_4-1667447498538.png

 

 

 

6.Choose separator Comma and click ok.

 

vaibhavkale570_5-1667447554254.png

 

 

remove unwanted column from table and you're done.

 

 

 

 

Thank you so much for your advice👏.

 

But if we filter out the null value, we'll lose Bruce (id 4) who no longer holds any position (should be blank in the Minster column).

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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 Kudoed Authors