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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
nickmarlborough
Creator
Creator

If statement across x3 tables with common ID

Hi, 

I have three tables each containing a common field 'ID'. Each table represents a different subject. lets assume its Biology, Physics and Chemistry. if an ID appears in one of the table it shows as '1' in the table and means that the ID takes the subject. 

I want to create a new field, can be in a newly created table if need be that shows if the ID takes a science subject (minimum 1) - in other words if the ID appears in one of the 3 tables then 'Science?' = 'Yes' otherwise 'No'

Trouble i am having is the fact all 3 science tables come from different Excel files. 

Labels (1)
3 Replies
LRuCelver
Partner - Creator III
Partner - Creator III

You can use e.g. the RangeCount function to count how many of the fields in the function are not Null:

LRuCelver_0-1708953597537.png

This is the code I used for the Datamodel:

Biology:
NoConcatenate Load * Inline [
	ID, Biology_Flag
    1, 1
    2, 1
];

Chemistry:
NoConcatenate Load * Inline [
	ID, Chemistry_Flag
    2, 1
    3, 1
];

Physics:
NoConcatenate Load * Inline [
	ID, Physics_Flag
    2, 1
    3, 1
];

English:
NoConcatenate Load * Inline [
	ID, English_Flag
    1, 1
    4, 1
];
nickmarlborough
Creator
Creator
Author

is there a way to have it just so that if in Biology, there is field to say 'Biology Mapped' or something like that

LRuCelver
Partner - Creator III
Partner - Creator III

I don't quite understand what you are meaning. Please elaborate.