Forum Discussion

Stabben23's avatar
Stabben23
Helper I
6 years ago
Solved

Add shift to fact table

Hi guys,   I want to add shift to my fact table, I have a dimension with start and end timestamp and a fact with timestamp. Now I want to map the shift field into facttable.  All solutions is OK,...
  • Ashish_Mathur's avatar
    6 years ago

    Hi,

    In Table1, write this calculated column formula

    =LOOKUPVALUE(Table2[Shift],Table2[DateStart],CALCULATE(MIN(Table2[Datastart]),FILTER(Table2,Table2[DateStart]<=EARLIER(Table1[TimeStamp])&&Table2[DateEnd]>=EARLIER(Table1[TimeStamp]))))

    Hope this helps.