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
Anonymous
Not applicable

Dax formula help needed

lanasa1980_0-1593179281877.png

Hello, I was trying to make another coulmn that will check each coulmn from left to right to show what leg of each of my shipments are at. So like if its at port, at sea, on rail, or out for delivery. Can anyone help me out with that?

1 ACCEPTED SOLUTION

Just reverse the order of the columns in the COALESCE() function that @Mariusz suggested.  That will return the value in each column in that order if it is not blank, so the order needs to be reversed to get your desired result.  With the current order, you got "At Port" for every row because it is not blank for all rows.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

5 REPLIES 5
Anonymous
Not applicable

lanasa1980_0-1593184749758.png

So I tried that last suggestion, but it didn't come out for what I was looking for. So for example I am tracking each leg of a container. It starts off at port, then sea, then rail, then out for delivery. SO those 4 columns show if a container has completed that part of the leg, I need to see what the current leg that container is in, so if it doesn't have any info in it then then that container is currently in the prior column with data.

Just reverse the order of the columns in the COALESCE() function that @Mariusz suggested.  That will return the value in each column in that order if it is not blank, so the order needs to be reversed to get your desired result.  With the current order, you got "At Port" for every row because it is not blank for all rows.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

That worked. Thank you so much. 

Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

Try this 

Column = 
COALESCE( 'Table'[Port], 'Table'[Sea], 'Table'[Rail], 'Table'[In Route to RDC/DC] )

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Pragati11
Super User
Super User

Hi @Anonymous ,

 

Your requirement is not very clear to me regarding the output you are looking for.

In your new calculated column do you need a concatenation of all the values from Column 1 to Column 3 ?

Kindly describe the required output.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

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.