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

Combine 2 columns in 1 in chart

Hey, guys!
I'm trying to find out the answer to the task.

I have a document with main and alternative states. I make different selections and make some charts for visualization. As well I have to use the results, which are presented in chart for further investigation. I can easily put result into the straight table in several columns, but then I need to combine these 2 columns into 1. Is there any possible way to do this?

I have tried to use Concat() with "chr(1)" as a separator, but I havent got the correct result.

Important: as if I use alternative states I see no opportunity to make any script changes. Only dynamical memory.

Thanks

Elena

8 Replies
sunny_talwar

Have you tried with &

FieldName1 & FieldName2

swuehl
MVP
MVP

Concat() will aggregate rows of a resident table, not concatenate columns in a chart.

If your first column expression is

=Sum({StateA} Value)

and your second

=Sum({StateB} Value)

you can use the string concatenation operator & to concatenate the parts:

=Sum({StateA} Value) & chr(10) & Sum({StateB} Value)

Anonymous
Not applicable
Author

Hey, Sunny!
Yes, but it seems to make the same number of rows with the final output

MainAlt

where Main is value of Main state, and Alt - of Alternative state.

And I need to have some operation equal to Concatenate in Load Editor, but for dynamic data. So that I have final number of rows equal to sum of rows number of Field1 and Field2.

ramasaisaksoft

Hi Elena,

Ex:- Load FirstName,

               Lastname,

               FirstName &'   '&Lastname as Fullname

          from ....xyz.xls;

Anonymous
Not applicable
Author

Hello, Stefan!
I have tried it once more, attach the picture to make clearer what i get with & and what I actually need.
combine_example.jpg

Anonymous
Not applicable
Author

Hey, Rama!
Thank you for your reply, but it wont work for me as if I dont have option to change the script.

swuehl
MVP
MVP

Maybe try the union operator + on your two sets, like


{StateA+StateB}


but it's unclear to me what you finally want to achieve.

Note that you are basically operating on the same record set, so if both states contain intersecting subsets, the union will not duplicate these record.

Anonymous
Not applicable
Author

The task is to organize dynamical processing of Mann-Whitney U-test based on 2 sets (alternative and main states in my case), which are selected by user in real time. The description of the algorithm says I have to combine both sets of values I have already received and then rank it.

I try to find more elegant solution, but still... no result.

Thank you for help, Stefan