Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All. I'm hoping someone can assist me. At the top of my data load editor I have sources listed.
SET Source_A = File1.txt
SET Source_B = File2.xlsx
SET Source_C = File3.xlsx
I want to be able to create an IF statement that looks at the sources and then creates a value in a field. For example:
IF(Source_A, 'Lions',
IF(Source_B, 'Tigers',
IF(Source_C, 'Bears'))) AS Oh_My;
Any help will be greatly appreciated.
Source_A etc are variables. You can reference them in a script expression using $() syntax. So your if condition would be like:
If('$(Source_A)' = 'something', 'Lions',...
I suspect what you are wanting to do is test the name of the file you are loading? If so, your test would be:
if (FileName() ='$(Source_A)', 'Lions', ....
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com