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: 
Not applicable

Make two rows into one row on straight table

Hi Everyone,

I am struggling with something which I know should be really easy.

I have a table which is the same as below. I only want a single entry for each key, but instead I am getting two lines. This is because there are two forms attached to the one key, which is acceptable.

keyform type65+ fall ncon65+, FallCAS110 Completed
001101YesYesNo
001110NoNoYes


How would I put this against a single line entry?

Thank you

6 Replies
IAMDV
Luminary Alumni
Luminary Alumni

Hi,

Which row do you want to show? Have you tried using the distinct clause?

Thanks,

DV

Not applicable
Author

I would like to have a single line for each Key, and then a colum for the form type being a 101, and another colum if the form type is a 110. In my databse I might have one key but several different form types attirubed to it. 

key65+ fall ncon65+ fall nconCAS101CAS110 Completed
001YesYesYesYes


Thanks for the quick response.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Consider removing from type from the dimensions and creating 2 expressions:

FT101 - IF([from type]=101,[form type])

FT110 - IF([from type]=110,[form type])

Hope this helps,

Jason

Not applicable
Author

I'm not sure exactly what you would like to do. This might be helpful:

Dimension:

key

Expressions:

If (max(if([65+ fall ncon]='Yes','1','0'))>0,'Yes','No')

etc

Not applicable
Author

Hi,

You can do something like this.

If u have more rows, u can use max function.

C u,

Stefano

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

To get the data from two sources into a single record, use JOIN. Something like this (please adapt to fit your data):

CombinedTable:

LOAD Key,

     'Yes' AS CAS101,

      ... (other fields from 101)

FROM Form101;

Left JOIN

LOAD Key,

     'Yes' AS CAS110,

     ... (other fields from 110)

FROM Form110;

If any other field have the same name in both source tables, rename at least one of them (using AS) so that they are different. In this example, you want only Key to have the same name in both tables.

Hope that helps

Jonathan

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