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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
unicorns
Helper II
Helper II

Conditional Column - take values from different columns if it exists

How could I write power query to achieve below? whichever column has value, it'll be listed in "Final ID" column.

If both ID and Identifier columns have values, then take ID column's value. 

 

 unicorns_0-1684971763403.png

 

unicorns_0-1684971635985.png

 

 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

pls try this

List.Max({[Id],[Identifier]})

Screen Capture #1167.png

View solution in original post

2 REPLIES 2
Ahmedx
Super User
Super User

pls try this

List.Max({[Id],[Identifier]})

Screen Capture #1167.png

Ritaf1983
Super User
Super User

Hi @unicorns 

Please to achieve your goal you can add a conditional column like on bellow picture:

Ritaf1983_0-1684981320750.png

Result

Ritaf1983_1-1684981382092.png

 

Link to sample file 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors
Top Kudoed Authors