1 of 1 people found this helpful
Thomas Karbe wrote:
The problem is that a calculated field with an IF statement cannot result in a boolean.
I always use 1/0 instead of Boolean. It's just a personal preference. So I never encountered the fact that an IF can't result in a Boolean.
Don't let that limitation stop you. Just make your results be 1 or 0 instead of TRUE or FALSE, and run with that.
I didn't open the workbook. I just wanted to add this to the discussion.
What Tableau version is your workbook, if I need to go there?
Since your filter calcs are Boolean, just rewrite the parameter-driven filter to do straight Boolean algebra instead of an IF statement.
([Time_Unit] = 'Months' AND [Current or Previous Time Period?] = 'previous' AND [Last Month ])
OR ([Time_Unit] = 'Months' AND [Current or Previous Time Period?] = 'current' AND [This Month ])
OR ([Time_Unit] = 'Weeks' AND [Current or Previous Time Period?] = 'current' AND [This week ])
(I didn't attach a sample workbook because there's not enough data in the sample to even illustrate how this works. Try it on your full data set.)