Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Evaluating Dimension Fields on both sides in Set Analysis

Hi ,

I have concatenated 2 tables as below:

Sales:

LOAD * INLINE [

ID1,AGE

1, 10

2, 20

3, 30

];

Concatenate

Customers:

LOAD * INLINE [

ID2,Name

1, Amy

2, Bob

3, Carla

];

We need to show the following columns in straight table chart:

ID2, Name, ID1, Age

ID1 and Age will only be displayed when value of ID1 is equal to ID2. We have to use only a single table.

Please do let me know the set analysis expression to get the desired output.

Thanks & Regards,

Basil

5 Replies
Nicole-Smith

Your load script should be like this (join instead of concatenate):

Sales:

LOAD ID1 as ID, AGE INLINE [

ID1,AGE

1, 10

2, 20

3, 30

];

Join

Customers:

LOAD ID2 as ID, Name INLINE [

ID2,Name

1, Amy

2, Bob

3, Carla

];

Then you can simply use ID, Name, and Age in your chart.

I've also attached a sample .qvw file.

dirk_konings
Creator III
Creator III

I would suggert a Left Inner Join, so your ID is in both tables and mandatory in table 1.

Dirk

Not applicable
Author

Hi Nicole,

Thanks for your reply.

Lets say I want to keep the 2 tables concatenated due to some reasons. In this case how would you implement the same?

Thanks & Regards,

Basil

Nicole-Smith

Unless I'm mistaken, you can't do it that way...

If the data isn't on the same line in your loaded table, you can't display it on the same line in a chart.

dirk_konings
Creator III
Creator III

If you want to keep your 2 tables, you can't use SetAnalysis.

Maybe you just need to use an IF statement in your expressions?