I am trying to group mu customers into various income buckets as per the table below:
with my measure:
Customer Sales by Income Group £ = calculate ([Total £ Sold], FILTER(values('Customers'[Name] ), COUNTROWS( FILTER('Income Groups', rankx(all(Customers[Name] ), [Total £ Sold], ,DESC ) > 'Income Groups'[Min] && rankx(all(Customers[Name] ), [Total £ Sold],, DESC ) <= 'Income Groups'[Max] ) ) >0 ))
But its grouping all of my customers in the first group.
I adapted the formuale from one I was using to rank by customer into top 5 etc, so I guess I need to take out the rankx elements- is this teh best way to do it?