Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I have used these Dax formula to calculate Previous Week but results are incorrect, can someone please help me rectify this? Thanks in advance.
First Formula used populates column but values are incorrect.
Previous Week in Second Forumula shows blank Values
@ValtteriN Can you assist? I do not have lastWeek as a table to filter on, so I used calendar and here are my results.
Dax Formula:
Hi @Merle,
You can try to use the following formula to get the previous week amounts:
formula =
VAR currdate =
MAX ( Calendar[Date] )
VAR weekStart =
IF (
WEEKNUM ( currdate, 1 ) <> 1,
currdate - WEEKDAY ( currdate, 1 ) + 1,
DATE ( YEAR ( currdate ), 1, 1 )
)
RETURN
CALCULATE (
SUM ( Table[TOTAL_ACTIONS] ),
FILTER (
ALLSELECTED ( Table ),
YEAR ( [Date] )
= YEAR ( weekStart - 1 )
&& WEEKNUM ( [Date] , 1 )
= WEEKNUM ( weekStart - 1 , 1 )
)
)
Regards,
Xiaoxin Sheng
Hi Valtterin,
Thank you for your response. The results I am looking for is Actions for the last week to the current week values not the actual week num.
Hi,
Try using WEEKNUM e.g.
Proud to be a Super User!
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |