I wanted to show last week vs this week for running totals.
I've created a custom 'Date' table that will contain all days.
I think I've got it now.
To get last week's SUM (for Tuesday), I performed the following:
VAR someDayLastWeek =
TODAY () - 7
VAR modDate =
MOD ( someDayLastWeek, 7 )
VAR lastTuesday = someDayLastWeek - modDate + 3
SUM ( data_table[net_quantity] ),
FILTER ( ALL ( 'Date' ), ISONORAFTER ( 'Date'[Date], lastTuesday, DESC ) )
If there is a better way of doing this, please let me know. Thanks all!
Click here to learn more about the September 2022 updates!
Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.
Watch Session 25 of Ted's Dev Camp.