This is down to your IF formula. What you've actually written is
IF [Sequence] = 2 THEN [Week Date] ELSE NULL END
Although you haven't explicitly specified that every sequence that isn't 2 is NULL, that's how tableau interprets it - and why you're finding the NULL value returned.
You could always filter on this field and exclude the NULL value.
Manideep - One saying which I coined long ago is "It's all about the rows". If you look at what your logic returns at a row level it will be clearer what is happening. You can do this by adding the sequence identifier dimension on the rows shelf and that will show you what is happening at the row level of your data and why it is being aggregated as such.
1 of 1 people found this helpful
That Null is for the other dates, since you have just mentioned the condition for sequence equal 2.
What about the other dates. If the conditions are failing for other sequences (which are not 2) then they will be classified as Null (which you are getting).
Output for the sequence = 2 (you can observe that other values associated with dates other than sequence = 2 are getting aggregated in Null)
Actual week wise data (Null = 181+166+132+167).
I hope this will help. I would like to know your thoughts on this and what is expected output as per you.
Thanks and Regards,
Dear @Ashish - At the first place, I want to understand why Tableau is getting into else loop.