Forum Discussion

DionTN's avatar
DionTN
Helper II
3 years ago
Solved

Add column based on double filter

I have two tables like this:  Company StartDate EndDate Regio a 01/01/2020 08/08/2020 Demo b 01/01/2020 08/08/2020 Demo c 01/01/2020 08/08/2020 Demo d 01/01/2020 08/08/2...
  • coskuersanli's avatar
    3 years ago

    Hi DionTN 

     

    Can you try as below please?

    Column = 
    
    CALCULATE
        (
            SELECTEDVALUE(Table1[Regio]),
            FILTER
                (
                    Table1,
                    Table1[Company] = Table2[Company] &&
                    Table1[StartDate] <= Table2[LoginDate] &&
                    Table1[EndDate] >= Table2[LoginDate]
                )
        )