Forum Discussion

khatch's avatar
khatch
Frequent Visitor
7 years ago
Solved

Lookup value to unrelated table, using min dates

This is a seemingly very simple question, but I cannot seem to find an answer.  I have two tables, one with transaction dates and the other with a calendar of fiscal period start and end dates.  I wo...
  • Anonymous's avatar
    Anonymous
    7 years ago

    You can use the following DAX to get the fiscal period.

     

    FiscalPeriod =
    CALCULATE (
        VALUES ( FYear[FiscalPeriod] ),
        FILTER (
            FYear,
            'Tran'[TranDate] >= FYear[StartDate]
                && 'Tran'[TranDate] <= FYear[EndDate]
        )
    )