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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

variable display and if condition

1. How do we get variable values displayed in qlikview?

Eg:

   varToday = DATE(today(),'YYYY-MM-DD');

I want to see the value assigned to varToday.

2. I would also like to know how "if condition" works in qlikview.

Eg: File1=upper(date(if(match(num(weekday('$(varToday)')),0,1),'$(varToday)'-4,'$(varToday)'-2), 'DDMMM'))

What will be the value in File1?

Thanks

1 Reply
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

   1. For getting the value of the variable you can use the variable name inside dollar expansion like $(varToday) in a text object or anything else.

   2. You can use condition like If($(File1)<Today(),$(File1),Today())

          File1 has the text upper(date(if(match(num(weekday('$(varToday)')),0,1),'$(varToday)'-4,'$(varToday)'-2), 'DDMMM')) if you used SET keyword before it.If you use LET then it has the value returned by the method.

LET computes the value and set to the variable.

SET set the value as expression you assigned and you need to compute it using $(=varToday).

Hope it helps

Celambarasan