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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Ericwhv
Helper II
Helper II

DAX - match / search vertically?

Hi Everyone, Thank you in advance!

I am building a "Routing Check" for the ground shipment. please see the example 1 below.

  • Group by the "HB"

  • We have a shipment from AMS to BUH.

  • if the GNR Origin = Consol Lane left 3 letter, it will be a "First leg".

  • if the GNR Dest = Consol lane Right 3 letter, it will be the "last leg".

  • the rest will be "transit Leg"

The aim/goal for this little project is want to flag the "HB" that is missing the "Last leg"

So, the Example 1 will be fine

please see below Example 2

  • we have the "First leg" from AMS to FRA, and the "Transit Leg" from FRA to BUD
  • but we are missing the "Last Leg" BUG to BUD
  • i will to show it in the new column saying "Missing last leg" something like that(Example 3)

    Example 1
    Ericwhv_0-1660917291338.png

    Example 2 

    Ericwhv_1-1660917320410.png

    Example 3 (Goal)

    Ericwhv_2-1660917337238.png

     

    So, not sure if any one can help on these?
    thank you so much!!!

1 ACCEPTED SOLUTION
PVO3
Impactful Individual
Impactful Individual

Hello,

 

You can do this in a couple of ways. Personally I would fix this with a measure instead of a column.

 

So just create a table visual, add [HB] as a field and add the measure below.

 

Measure =

IF(

  NOT ISBLANK(

  CALCULATE(

    COUNTROWS(Table),

    Table[Leg check] = "Last leg"

  )

),

"OK",

"Missing Last Leg"

)

  

 

View solution in original post

2 REPLIES 2
PVO3
Impactful Individual
Impactful Individual

Hello,

 

You can do this in a couple of ways. Personally I would fix this with a measure instead of a column.

 

So just create a table visual, add [HB] as a field and add the measure below.

 

Measure =

IF(

  NOT ISBLANK(

  CALCULATE(

    COUNTROWS(Table),

    Table[Leg check] = "Last leg"

  )

),

"OK",

"Missing Last Leg"

)

  

 

Thank you! it is work!!
thank you so much!

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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