Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Find postcalcode in between range and lookup value based on second value

Hi,   Currently working on a case where I need to calculate estimated delivery and pickup times. Need to extract the leadtimes per postalcode/Transport Type to calculate this. I can't work with a k...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Found the solution for it with following column:

     

    LeadtimeCalculation = LOOKUPVALUE('LeadTime'[Leadtime],Leadtime[TT code],G002[D.S.T]
    ,CALCULATE ( SELECTEDVALUE ( LeadTime[Leadtime] ),
    FILTER (
    LeadTime,
    LeadTime[From] <= 'G002'[Zip Code]
    && LeadTime[To] >= 'G002'[Zip Code]
    ),FILTER(Leadtime, Leadtime[TT code] = 'G002'[D.S.T])
    ))