I have created a calculated field to only show week numbers for the latest four weeks from today. I called it latest_4_weeks with the following definition:
if (([week_number] <= datepart('week',today())) and ([week_number] > datepart('week',today()) -4)) then [week_number]
end
When I add this field to my columns an unwanted NULL
value shows up. I still haven't been able to tell the Tableau to ignore all the null values using IFNULL()
, etc.
And when I manually filter out the NULL
value, the filter no longer works as it should. Since it will now apply the current values and all other values that relate to next week will be ignored.
How can I effectively remove NULL
in my calculated field?