Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get values from a field from one table only in a association?

Hello!

How can I get values from one field only if the field is associated with another table?

E.g. CustomerID exists in Customer table and Enquiries table but I only want values from CustomerID in Customers table.

Is there an alternative to copying the field to create another one?

2 Replies
perumal_41
Partner - Specialist II
Partner - Specialist II

Hi Michael,

create flag in two table and this flag use in  Expression. i.e

Script ;

Customer :

Load *,1 as Flag from customer table ;

Enuery:

Load *,1 as Flag1 from Enuery table;

Expression :

Count({<Flag={1}>}CustomerDimID)


Not applicable
Author

Hi,

Try this

Ex:

Customer :

Load *,1 as Flag from customer table ;

Enquiries:

Load *,2 as Flag from Enuqiries table;

For Dimension, Use calculated dimension like,

=If(Flag=1,CustomerID)    // For CustomerID belongs to Customer table

=If(Flag=2,CustomerID)    // For CustomerID belongs to Enquiries table

//y For Expressions like,

=Count({<Flag={1}>} CustomerID) or

=Count({<Flag={2}>} CustomerID)

Hope this will help you.

Thanks,

Ravikumar