Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Tee_Ayo
Contributor
Contributor

Working with dimensions

For instance I have Table A as shown below

Category Product Sales
A A1 23
A A2 43
A A4 45
A A5 76
B B1 28
B B2 82
B B3 93
C .. ..
D .. ..
E .. ..
Total   390


Now I want to be able to do this if I select Category A as a dimension , I want to get the total for Category A which in this case is 187 and all the other Categories that is B - E should be shown as Other and I get a combined summation for those Categories. If I select B I get the sum form and everything else is combined together. 

I hope this make sense. How can I get that done. 

Labels (1)
1 Reply
MatheusC
Specialist
Specialist

Hi @Tee_Ayo 

Create a 'products' field by combining these values in your script:
Example:

If the unification is equal to all values ​​that start with A, you can do it using the wildcard character * to search for all values ​​that start with the letter A:

if(wildMatch(Product, 'A*'), 'A', 'Others') as ProductGroup

Or by selecting each value:

if(Match(Product, 'A1', 'A2', 'A4', 'A5'), 'A', 'Others') as ProductGroup


Regarts, Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!