Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

kavita25
Valued Contributor

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
Valued Contributor

Re: how to show two column values in one row

Thank You for all your support.

I solved it.

For reference PFA.

Regards,

Kavita

22 Replies
MVP
MVP

Re: how to show two column values in one row

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
Valued Contributor

Re: how to show two column values in one row

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

Re: how to show two column values in one row

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

MVP
MVP

Re: how to show two column values in one row

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
Valued Contributor

Re: how to show two column values in one row

PFA..

kavita25
Valued Contributor

Re: how to show two column values in one row

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

sbobbyraj
Contributor III

Re: how to show two column values in one row

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
Valued Contributor

Re: how to show two column values in one row

the numbers are repeated twice..after using ur query

MVP
MVP

Re: how to show two column values in one row

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
Community Browser