Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kavita25
Partner - Specialist
Partner - Specialist

how to show two column values in one row

Hi,

sunindia

I want to show column1 values and 2nd column in one row..

For e.g

Id  Column1   Column2

1      125             -

1       300             -

1        -                  520

1        -                  452

Result:

Id  Column1   Column2

1      125              452

2       300             520

Please help me with this issue.

Regards,

Kavita

1 Solution

Accepted Solutions
kavita25
Partner - Specialist
Partner - Specialist
Author

Thank You for all your support.

I solved it.

For reference PFA.

Regards,

Kavita

View solution in original post

22 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Where does the 2 in the second line come from?

Use a straight table with ID as the dimension, and Sum(Column1) / Sum(Column2)

or Concat(Column1, ',') / Concat(Column2, ',')  as expressions.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
kavita25
Partner - Specialist
Partner - Specialist
Author

I want it in different row...concat wont work... and my column1 and column 2 is in string...

sunny_talwar

How did the result get id = 2? The source only seem to have id = 1?

jonathandienst
Partner - Champion III
Partner - Champion III

You can't do much else with the sample data you provided.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
kavita25
Partner - Specialist
Partner - Specialist
Author

PFA..

kavita25
Partner - Specialist
Partner - Specialist
Author

The id will be the same for both the columns, only the problem is...its not showing in one row..

Anonymous
Not applicable

HI,

It seems that in your model you have a table loaded like this:

Id  Column1   Column2

1      125             -

2       300             -

1        -                  520

2        -                  452

You should load it differently.

For example, if your table's name is TABLE, then:

TABLE_FINALE

LOAD

Id,

Column1

RESIDENT TABLE;

JOIN (TABLE_FINALE)

LOAD

Id,

Column2

RESIDENT TABLE;

DROP TABLE TABLE;

Then you will have this table:

Id  Column1   Column2

1      125              520

2       300             452

kavita25
Partner - Specialist
Partner - Specialist
Author

the numbers are repeated twice..after using ur query

jonathandienst
Partner - Champion III
Partner - Champion III

I cannot see any data or object on your sample that fits the problem described in your original post.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein