Hi guys,
I'd like to calculate average for a field only for current year
I tried to use
IF(Year(date)=2015 THEN Avg(Field) END)
can't aggr vs not aggr.
Do you know another way?
Thanks,
9 answers
You can try:
IF(Year(ATTR(date))=2015 THEN Avg(Field) END)
Also, see: Aggregation, Granularity, and Ratio Calculations | Tableau Software