Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dsharmaqv
Creator III
Creator III

Coloring/Concatenating different Calculation in single column

Hi

I am trying to calculate come counts of seviority and trying to display in same column.

For instance  have to count seviority by Column1

Output:

C1

Count of Seviority

(High/Med/Low)

A1/1/0
B2/1/2
C0/0/1
D3/0/0

And display like this

Table A

C1seviority
AHigh
AMed
BHigh
BHigh
BLow
BMed
BLow
CLow
DHigh
DHigh
DHigh
1 Solution

Accepted Solutions
adamdavi3s
Master
Master

Another way without changes to the script is a simple

=sum(if(seviority='High',1,0)) &'\'&sum(if(seviority='Med',1,0)) &'\'&(if(seviority='Low',1,0))

View solution in original post

5 Replies
adamdavi3s
Master
Master

AFAIK the only way to do this would be to have three different expressions and colour them

sunny_talwar

I don't think coloring can work, but concatenation should be simple I think

Script:

LOAD C1,

          Dual(seviority, Match(seviority, 'High', 'Med', 'Low')) as seviority

and then on the front end

Dimension:

C1

Expression:

Concat(Aggr(Count(seviority), c1, seviority), '/', -seviority)

adamdavi3s
Master
Master

Something like this is possible if you need colour coding, but you'll have to decide between having it all in one cell or having colours I am afraid!

Capture.PNG

adamdavi3s
Master
Master

Another way without changes to the script is a simple

=sum(if(seviority='High',1,0)) &'\'&sum(if(seviority='Med',1,0)) &'\'&(if(seviority='Low',1,0))

dsharmaqv
Creator III
Creator III
Author

I have tweeked a bit to avoid color coding

sum(if(seviority='High',1,0)) &'(H)\'&sum(if(seviority='Med',1,0)) &'(M)\'&sum(if(seviority='Low',1,0)) &'(L)