Forum Discussion
Calculation based on Max Date in Date Slicer while ignoring Min Date
Dear kovacikm78 ,
if I understand you correctly please use the below meausre:
Revenue PY =
CALCULATE(
SUM(Sales[Sales Amount]),
DATESINPERIOD(
'Date'[Date],
MAX('Date'[Date]),
-3,
MONTH
)
)
please refer to the DATESINPERIOD function in the below link:
DATESINPERIOD function (DAX) - DAX | Microsoft Learn
please markup this as an accepted solution if it works.
Best Regards,
- kovacikm783 years agoFrequent Visitor
Hello,
thank you very much for you help. The calculeation works fine ony if I dont use timeline. Once I add months in a table or chart, the result is computed only for specific month and not for the whole period (3 months back).
It should work even for days. So if I have in table specific day, it should return sum of sales for previous three months. Now it returs only one day. Or one month, if I choose months view...
Is there a way it can be calculated that way?