Forum Discussion
Filtering on Last complete week
- 7 years ago
Unfortunately no.
Can't share it.
Anyhow. I think I solved it. I managed to get the last 2 weeks with the metric:
Last2Weeks =
VAR ThisWeek =
CALCULATE (
MAX( 'Fiscal Calendar'[Calendar Date] ),
FILTER (
ALL ('Fiscal Calendar' ),
'Fiscal Calendar'[Week Completed Flag]="Y"
)
)
RETURN
IF(
MAX('Fiscal Calendar'[Calendar Date])+6>=ThisWeek
,1
,blank()
)and then I just filtered the visual with the Complete Week Flag='Y' and the Last2Weeks metric to be = 1
I'm just wondering fi the second part of the return is correct. MAX('Fiscal Calendar'[Calendar Date])+6>=ThisWeek
Unfortunately no.
Can't share it.
Anyhow. I think I solved it. I managed to get the last 2 weeks with the metric:
Last2Weeks =
VAR ThisWeek =
CALCULATE (
MAX( 'Fiscal Calendar'[Calendar Date] ),
FILTER (
ALL ('Fiscal Calendar' ),
'Fiscal Calendar'[Week Completed Flag]="Y"
)
)
RETURN
IF(
MAX('Fiscal Calendar'[Calendar Date])+6>=ThisWeek
,1
,blank()
)
and then I just filtered the visual with the Complete Week Flag='Y' and the Last2Weeks metric to be = 1
I'm just wondering fi the second part of the return is correct. MAX('Fiscal Calendar'[Calendar Date])+6>=ThisWeek