Now I have a table as follows
So what I want is to save the result from Average where data equals to 1-Jan to 1-Apr in a calculated variable.
How should I do that? Many thanks for your help.
Please try the following calculation;
AVG(IF [Date]>=#01/01/2017# AND [Date]<=#01/04/2017#
Hope this helps.
Create a calculation: IF [Date] >= #2017/01/01# AND [Date] <= #2017/04/01# THEN [Value] END.
Drag this to text and change the aggregation to AVG.
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.
Retrieving data ...