Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

if else statement

I am sorry I have to ask this and to open a new thread, but I am trying to get the project status automatically calculated which - after many tries - isnt working 😞

(Project)End is before today then (<today) -> finished (Beendet)

(Project)Start is in future (>today) -> in progress/not started (in Arbeit)

all other cases -> aktive (läuft)

I have already tried a lot of combinations of the following line but if i change the commas or the brackets some parts of the formula get coloured and others not,e.g. then "else" is green instead of blue but the formula gets coloured (which means that it is correct).

if((date(Ende,'DD.MM.YYYY')<today('DD.MM.YYYY')), 'beendet'), if(date(Start,'DD.MM.YYYY')>today('DD.MM.YYYY'),'in Arbeit') else 'läuft' as V_Status



Must be a "Newbie" questions but i havent found anything in the online help and the forum which gives me a hint, everytime "error in script" 😞

Thanks in advance for your help,

christoph

1 Solution

Accepted Solutions
martin59
Specialist II
Specialist II

Hi,

You can try to do this in your load script :


if(Ende<today(),

'beendet',

if(Start>today(),'in Arbeit','läuft')) as V_Status




View solution in original post

2 Replies
martin59
Specialist II
Specialist II

Hi,

You can try to do this in your load script :


if(Ende<today(),

'beendet',

if(Start>today(),'in Arbeit','läuft')) as V_Status




Not applicable
Author

shame on me, it would have been that simple 😞

its really hard to get along with Qlikview if you have just been working with excel

many, many thanks for your prompt reply!!