I have a dataset within SQL that pulls sales by client on a product basis. Some clients can have multiple products, while others can have just one. I'm trying create a histogram of clients by their aggregated spend amount, but the classification I'm using is a measure, and I can't figure out how to make that a dimension.
Using the table below, the Sale Amount for AAA would be $7500, BBB would be $4000 and CCC is $14,000. I would use the following :if SaleAmt > 10000 then "10K+", elseif SaleAmt > 5000 then "5K-10K, else "sub-5K" end and then combine it with countd(Client) to get the histogram, ideally it would show 1:2:1 for 10K+, 5K-10K, sub-5K.
But when I try this within Tableau, it treats the if statement result as a measure and not a dimension, not something I can classify around. Is there a better way to do this within Tableau?
Client Product SaleAmt
AAA 1 3500
AAA 2 4000
BBB 1 4000
CCC 4 7000
CCC 7 7000
DDD 5 8000