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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors