Forum Discussion
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 1Example 2
Example 3 (Goal)
So, not sure if any one can help on these?
thank you so much!!!
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"
)
2 Replies
- PVO3
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"
)
- Ericwhv
Helper II
Thank you! it is work!!
thank you so much!