I probably wouldn't recommend a large amount of IF statements in this case.
What you could consider instead is creating a small secondary dataset that contained all your rates, you could then blend that in and use that in your calculation
so you could use a table like this (I just created it in excel and pasted it into Tableau)
Then you can create a calculation like this:
SUM([Number of Sets])*ATTR([RateCard].[Factor])
This is a lot simpler than writing all the various nested IFs and CASEs and maintaining a large calculation.
Hope this helps, example attached
ratecard.twbx 70.4 KB
Thank you. I am currently traveling and will try when I get back to the office. Looks like your solution is easier to maintain. Thank you
1 of 1 people found this helpful
Thank you for this information. Unfortunately, I was just not able to figure out how to do the data blend you described. I am just not that advanced in Tableau.