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
Hi,
I'm trying to write a measure to calculate the volume from a table but for the previous week selected in the filter. So the user can select the current week but the measure will show what is in the previous week. My data has a week column that is linked to the date table via week.
My DAX measure is pretty much as shown below.
VAR = SelectedWeek = SELECTEDVALUE(Week)-7
RETURN
CALCULATE(COUNT(ID),'TABLE'WEEK = _SelectedWeek),ALLEXCEPT('DateTable'WEEK))
Any clue where I'm going wrong?
Thanks
Solved! Go to Solution.
@Ben1981 , Try using below mentioned method
VolumePreviousWeek =
VAR SelectedWeek = SELECTEDVALUE('DateTable'[Week]) - 7
RETURN
CALCULATE(
COUNT('YourTableName'[ID]),
FILTER(
ALL('DateTable'),
'DateTable'[Week] = SelectedWeek
)
)
Please accept as solution and give kudos if it helps
Proud to be a Super User! |
|
@Ben1981 , Try using below mentioned method
VolumePreviousWeek =
VAR SelectedWeek = SELECTEDVALUE('DateTable'[Week]) - 7
RETURN
CALCULATE(
COUNT('YourTableName'[ID]),
FILTER(
ALL('DateTable'),
'DateTable'[Week] = SelectedWeek
)
)
Please accept as solution and give kudos if it helps
Proud to be a Super User! |
|
Yeah that worked, thank you! 🙂