Discussion Board for collaboration related to QlikView App Development.
is it possible to create a variable that has two possible outcome?.
For example, I want this statement to be held by one variable:
if OPEN_DATE ('DD/MM/YYYY') < '01/06/2007' then A otherwise B
if not what could be the best way to go about this rather than created a field on the script?
Go to Solution.
You could add a paramter to your variable.
Assign this to your variable:
If( Max($1) < '01/06/2007' ,'A','B')
calling the variable like:
and so forth
in case you want to calculate it row-based don't keep the equal sign, otherwise keep it in the variable
hope this helps
View solution in original post
You can assign a formula to a variable, e.g.
=If( Max(OPEN_DATE) < '01/06/2007' ,'A','B')
(This assumes that OPEN_DATE has 'DD/MM/YYYY' as format and that the default format is the same).
Just make sure that the variable definition starts with an equals sign. See The Magic of Variables
The issue in making it a filed in the table (your method) is I will have to use it 4 times from 3 difference sources. therefore I have to 'rename' this field 4 times rather than calling it once.
Hence I want to know is the way of making it a variable with two possible outcomes rather