Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I have sample data, can you please help me to create buckets like top10, top20, top30 and above 30... etc
PFA,
I didn't completely grasp it, but perhaps this could offer some help.
Data:
LOAD * FROM FoodSales;
Join
LOAD *,
'Top'& Left(CatToCount, Index(CatToCount, '<')-1) as "Category Bucket";
LOAD Category,
Class(Count(Category) ,10) as CatToCount
Resident Data
Group By Category;
DROP Field CatToCount From Data;
Here is an example with class() and aggr() and rank() to bucket the performance of a dimension [Sales Rep ID] against a measure ( sum(Sales)):
aggr('Top' & right(class(rank(sum(Sales)),10),2),[Sales Rep ID])