Forum Discussion

Dudeman's avatar
Dudeman
Helper I
3 years ago
Solved

Simple(?) Lookup not working

Hi. Need a hand please. Here is a sample workbook: https://we.tl/t-T83HOaxQNj    I have 2 date tables and a sales data table. One of the date tables is special in that it aligns same day of the mo...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Dudeman 

    You can create the following measure:

    Measure = var _date = MAX('Invoice Date Table'[Date])
    var _d=MAXX( FILTER(ALL('Alignment Table') ,'Alignment Table'[Date] = _date) , [SDayLM])
    return
    CALCULATE(SUM('Invoice Table'[Sales]) , 'Invoice Date Table'[Date] = _d)

     

    Best Regards!

    Yolo Zhu

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