
I want to group & summarize by sales quartile. For instance if sales are $400, the top quartile of items would be those that have the highest sales and make up the first $100 of sales, the second quartile the items with the next highest sales and so on. The number of items per quartile would *not* be the same.
I did a bunch of searching and reading last night and all the rank_percentile and percentile solutions I found implemented breaks between the quartiles based on the distinct count of items in the population. rank_percentile(sales) did the same thing, or I wasn't doing something correctly.
The end result would be a summary table as below. Seems like this ought to be simple but I have really struggled with figuring out how to do it.
Q1: Total Sales $ ($100), # of SKU's
Q2: Total Sales $ ($100), # of SKU's
Q3: Total Sales $ ($100), # of SKU's
Q4: Total Sales $ ($100), # of SKU's
If you are trying to break data into quartiles based on value it will require a series of nested table calculations - I did something like that a few years ago - see https://public.tableau.com/app/profile/jim.dehner/viz/Publicversionsalesquintiles/Story1 it is a downloadable workbook that includes how to instructions
Thanks
Jim - Tableau Visionary