Forum Discussion

robertomari2020's avatar
6 years ago

Show only the value for the current Year

Hi everyone, 

 

I think I have a pretty simple question.

 

How do I have to change this measure in order to ONLY show values for the current year?

(I want to show the accumulated values of the current year only)

 

ShowOnlyValueForCurrentYear = 
VAR maxWeek = MAX('Calendar'[CalendarWeek])
VAR maxYear =  MAX('Calendar'[Year])
RETURN

CALCULATE(
    [Total Value Orders]; 
    ALL('Calendar'[CalendarWeek]);
    FILTER(ALL('Calendar'[Year]); 'Calendar'[Year] = maxYear);
    'Calendar'[CalendarWeek] <= maxWeek
)

 

 

 

Thanks in advance for your help! This is a very helpful community 🙂

10 Replies