Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Combining povit columns and comparing data in povit

Hi Team,

Good day

please look on bellow issue

How to combine the columns expression into one column?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

With more complex expressions, this might get a little hard to read.

You can also use a pick(match()) combination and using Column()

=Pick(

Match(Column(1)&Column(2)&Column(3)&Column(4) , $(=Concat(Code,','))),

$(=Concat(Chr(39)&status&chr(39),',',Code))

)

Note that your code table shows two entries for code 6565, average and good. Is this intended?

edit:

Or using your expression labels:

=Pick( Match(H&E&F&G , $(=Concat(Code,','))),

$(=Concat(Chr(39)&status&chr(39),',',Code))

View solution in original post

19 Replies
swuehl
MVP
MVP

And your pivot table looks original like...?

(I am not talking about a screenshot, but a full description of dimensions, expressions, settings, data model)

It's currently hard to understand where you are coming from.

Please post a sample QVW with some sample data and your expected result.

Colin-Albert

Can you describe how the combination column should be calculated?

Your screen shots omit the column headings.

Is it

(Column1 * 10000) + (Column2 *1000) +(Column3 * 100) + (Column4 * 10) + Column5  as Combined


How are you deriving the final numbers and description - is this from another table?

Anonymous
Not applicable
Author

By using the column or column no to combine the column in the pivot table and we get the result

swuehl
MVP
MVP

Something like this?

=Column(1)*10000+Column(2)*1000+Column(3)*100+Column(4)*10+Column(5)

Or are these columns dimensional columns, and you are using only 1 expression?

It would really be helpful if you could post a small sample QVW that demonstrates your setting, also demonstrates how your lookup table looks like.

Anonymous
Not applicable
Author

Thanks all  for sheering your ideas,


swuehl and Colin Alber

i am attaching sample QVW file with my requirements and thoughts


please look on that .let me know


regards,

Bobby

swuehl
MVP
MVP

Maybe like this?

Or could you do the whole thing in the script? That would be possible if the combined column wouldn't change for a CITY (like in your sample).

sunny_talwar

Try this may be:

=Aggr(If(A&B&C&D * 1 = Code, status), Code, CITY)

=Aggr(If(A&B&C&D * 1 = Code, [out of 10]), Code, CITY)

Capture.PNG

Anonymous
Not applicable
Author

Hi sunindia ,swuehl

Excellent but i need some more help

but now i update my QVW file with my new requirements.please look on attached qvw file

note:in dimensional level i have more level drill down  options then that time i want see last level matching data as well

let me know if you need more explanation

Regards,

Bobby

sunny_talwar

This may be:

=Aggr(If(if(A=1,'5',if(A=0,'6'))&if(B=1,'5',if(B=0,'6'))&if(C=1,'5',if(C=0,'6'))&if(D=1,'5',if(D=0,'6')) * 1 = Code, status), Code, CITY)

=Aggr(If(if(A=1,'5',if(A=0,'6'))&if(B=1,'5',if(B=0,'6'))&if(C=1,'5',if(C=0,'6'))&if(D=1,'5',if(D=0,'6')) * 1 = Code, [out of 10]), Code, CITY)


Capture.PNG