Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a straight table which is showing top n products by their sales. I have to sort these products by top n desc and it should show top n values + others by date except product = car. Car should always appear at the bottom after others even if its not part of top n. Please help. Attached is the sample QV app.
Try like:
Calculated dimension:
=Aggr(If(Rank(Sum({<Product-={'Car'}>}Sales))<=vTopN, Product, if(Product='Car', Product, 'Others')), Product)
Sort Desc by expression:
=Aggr(If(Rank(Sum({<Product-={'Car'}>}Sales))<=vTopN, Sum(Sales), if(Product='Car', -2, -1)), Product)
Try like:
Calculated dimension:
=Aggr(If(Rank(Sum({<Product-={'Car'}>}Sales))<=vTopN, Product, if(Product='Car', Product, 'Others')), Product)
Sort Desc by expression:
=Aggr(If(Rank(Sum({<Product-={'Car'}>}Sales))<=vTopN, Sum(Sales), if(Product='Car', -2, -1)), Product)
Perfect! Thank you Tresesco