Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table object in Qlik Sense like this:
Column1 | Sales Category A | Sales Category B | Sales Category C | Sales Category D |
12 | 10 | |||
13 | 20 | |||
12 | 30 | |||
14 | 40 |
Is there a way I can reduce it to the following format through chart expressions:
Column1 | Sales | Category |
12 | 10 | A |
13 | 20 | B |
12 | 30 | C |
14 | 40 | D |
We can assume that each row will have only one category of sales.
Thanks and Regards.
This would typically be handled script-side, through Crosstable Load, as detailed here: https://community.qlik.com/t5/Qlik-Design-Blog/The-Crosstable-Load/ba-p/1468083
If it's just those four categories or a small number in general, you could probably get this done using simple if() statements, e.g.
if([Sales Category A]>0,'A'if([Sales Category B]>0,'B'....) for the Category field, and sum([Sales Category A] + [Sales Category B] ...) for the sum.
This would typically be handled script-side, through Crosstable Load, as detailed here: https://community.qlik.com/t5/Qlik-Design-Blog/The-Crosstable-Load/ba-p/1468083
If it's just those four categories or a small number in general, you could probably get this done using simple if() statements, e.g.
if([Sales Category A]>0,'A'if([Sales Category B]>0,'B'....) for the Category field, and sum([Sales Category A] + [Sales Category B] ...) for the sum.
Thank you @Or , this was indeed helpful and I was able to get the expected output.