Forum Discussion

bignadad's avatar
bignadad
Helper I
2 years ago
Solved

Return value from Date table based on current date

This seems so simple but its not working. I have a MasterDate table and I am trying to find the first Date for the Incentive Quarter.   The incentive quarter is based on today's date which w...
  • jdbuchanan71's avatar
    2 years ago

    It seems like this one should work. Is there maybe a filter on the dates tables somewhere else?  Maybe try this.

     

    thisQtr =
    CALCULATE (
        MAX ( MasterDate[Incentive Quarter] ),
        ALL ( MasterDate ),
        MasterDate[Dates] = TODAY ()
    )

     

    Or maybe your MasterDate table does not include today meaning it is cutting off before today?

     

    I tested something similar in a sample file and got what I would expect:

     

    Today Month Year =
    CALCULATE ( 
        MAX ( Dates[Mth-Year] ),
        ALL ( Dates ),
        Dates[Date] = TODAY ()
    )