Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi all!
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:
measure_running_total_last_week =
VAR someDayLastWeek =
TODAY () - 7
VAR modDate =
MOD ( someDayLastWeek, 7 )
VAR lastTuesday = someDayLastWeek - modDate + 3
RETURN
CALCULATE (
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!
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
19 | |
18 | |
18 | |
15 |
User | Count |
---|---|
38 | |
22 | |
18 | |
15 | |
11 |