Forum Discussion
Same day last week
- 6 years ago
Anonymous ,
Basically 7 days behind measure will keep on running past and give you data unless you filter a date . when you select
a date in the calendar then it will stop
M.Sameday_LW Sales = CALCULATE(SUM(vTransaction[EX_GST_AMT]),
DATEADD('Dim Date'[CALENDAR_DATE_FMTD],-7,DAY))This set should work better
This Day = CALCULATE(sum(vTransaction[EX_GST_AMT]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])))
M.Sameday_LW Sales = CALCULATE(sum(vTransaction[EX_GST_AMT]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])-7))but this will also depend on a max date to take max date from the table if needed
This Day = CALCULATE(sum(vTransaction[EX_GST_AMT]), FILTER(ALL('Date'),'Date'[Date]=max('vTransaction'[Date])))
M.Sameday_LW Sales = CALCULATE(sum(vTransaction[EX_GST_AMT]), FILTER(ALL('Date'),'Date'[Date]=max('vTransaction'[Date])-7))
Anonymous ,
Basically 7 days behind measure will keep on running past and give you data unless you filter a date . when you select
a date in the calendar then it will stop
M.Sameday_LW Sales = CALCULATE(SUM(vTransaction[EX_GST_AMT]),
DATEADD('Dim Date'[CALENDAR_DATE_FMTD],-7,DAY))
This set should work better
This Day = CALCULATE(sum(vTransaction[EX_GST_AMT]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])))
M.Sameday_LW Sales = CALCULATE(sum(vTransaction[EX_GST_AMT]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])-7))
but this will also depend on a max date to take max date from the table if needed
This Day = CALCULATE(sum(vTransaction[EX_GST_AMT]), FILTER(ALL('Date'),'Date'[Date]=max('vTransaction'[Date])))
M.Sameday_LW Sales = CALCULATE(sum(vTransaction[EX_GST_AMT]), FILTER(ALL('Date'),'Date'[Date]=max('vTransaction'[Date])-7))