Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sban
Contributor III
Contributor III

Reducing No of Columns

Hi, 

I have a table object in Qlik Sense like this:

Column1Sales Category A Sales Category B Sales Category C Sales Category D
1210   
13 20  
12  30 
14   40

 

Is there a way I can reduce it to the following format through chart expressions:

Column1SalesCategory
1210A
1320B
1230C
1440D

 

We can assume that each row will have only one category of sales.

Thanks and Regards.

1 Solution

Accepted Solutions
Or
MVP
MVP

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.

View solution in original post

2 Replies
Or
MVP
MVP

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.

sban
Contributor III
Contributor III
Author

Thank you @Or , this was indeed helpful and I was able to get the expected output.