Forum Discussion

monojchakrab's avatar
monojchakrab
Icon for Resolver III rankResolver III
4 years ago
Solved

Add date filter to 7 day moving average formula

Hiya All,   I have a 7 day moving average code as shown below : 7 day MA = CALCULATE( AVERAGEX(SUMMARIZE('Date Table', 'Date Table'[Date]), 'Measures tray'[Total Sales]), ...
  • PC2790's avatar
    4 years ago

    Did you try using the date from your Fact table instead of Dates Table?

    As in LASTDATE(DatefromFactTable)

  • monojchakrab's avatar
    4 years ago

    That works of course - but I wanted to avoid that, since I have generated a date table separately and wanted to work off that, with filters to filter to the dates I want to keep in the visual