Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is it possible to create dynamic category base on user selections?
In above example, I have hard coded "Other" category for Products D,E,F
But my requirement is - For example:
If user selects Product A, B then rest of the possible products should come under category "Other"
If user selects A, D, C then rest of the possible products should come under "Other"
Kindly help!
@sunny_talwar @swuehl @Gysbert_Wassenaar @tresesco
Thanks
Here is another option
Create an inline table like this
Dim:
LOAD * INLINE [
Dim
1
2
3
];
and then this
Dimensions
=Pick(Dim, 'Revenue','Income','Expense')
=Aggr(If(Product = Only({1} Product), Product, 'Others'), Product)
Expression
Pick(Only(TOTAL <Dim> {1} Dim),
Sum({<Product>}Revenue),
Sum({<Product>}Income),
Sum({<Product>}Expense)
)
see attached qvw
hope this helps
Calculated dimension:
Aggr({<Product>} Only({<Product>}If( Index(GetFieldSelections(Product, '|'),Product) Or Len(GetFieldSelections(Product))=0,Product, 'Others')),Product)
Expression:
sum({<Product>}Revenue)
Here is another option
Create an inline table like this
Dim:
LOAD * INLINE [
Dim
1
2
3
];
and then this
Dimensions
=Pick(Dim, 'Revenue','Income','Expense')
=Aggr(If(Product = Only({1} Product), Product, 'Others'), Product)
Expression
Pick(Only(TOTAL <Dim> {1} Dim),
Sum({<Product>}Revenue),
Sum({<Product>}Income),
Sum({<Product>}Expense)
)
Thanks Frank, Tresesco, Sunny