Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

dax formula date range including today

I need help defining a column to show Today's date minus 7 days and include all dates within that range.  I've created the following columns, hoping I would find a way to get the correct syntax in on...
  • jdbuchanan71's avatar
    jdbuchanan71
    7 years ago

    You will need a calender table hooked to your fact table but then you can use a calculated column like this in your fact table.

    Dates List = 
    VAR RowDate = table[table date]
    RETURN CALCULATE(CONCATENATEX(DATES,DATES[Date],"| "),DATES[Date]<=RowDate,DATES[Date]>=RowDate-7)