Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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