Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
fzalexanderjohn
Creator
Creator

Compare variable to result of addyears() in load script

Hello,

I have these two lines in my load script:

 

    if([Datum ab] <= date('$(vDatenStand)') and [Datum bis] >= date('$(vDatenStand)'), Betrag) as 'Betrag aktuell',
    if([Datum ab] <= date(addyears('$(vDatenStand))',-1)) and [Datum bis] >= date(addyears('$(vDatenStand))',-1)), Betrag) as 'Betrag VJ',

The first one works as intended, the second one doesnt.

The variable:

Let vDatenStand = today()-1;

How the data in the fields looks:

2019-01-30 08_25_49-Vertriebsdaten GL 6.1 _ Datenmodell - Qlik Sense.png

I tried it without the date() function as well. But I can't get it to work

 

Labels (1)
1 Reply
fzalexanderjohn
Creator
Creator
Author

I noticed the wrong ')' at (vDatenStand)) like 10 seconds after posting.. not enough coffee