Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Case Portal has moved to Qlik Community! Read the FAQs to start exploring Support resources.
cancel
Showing results for 
Search instead for 
Did you mean: 
curiousfellow
Creator III
Creator III

compare date variable with field value

I have been struggling for hours now to get the correct  expression, so I hope you can help me.

 

I created a variable vMonthend_year_1:  =date(MonthEnd( addyears(today(),-1)),'DD-MM-YYYY')

When I use this expression in a textbox  it shows the correct value (30-11-2019) because current date is 25-11-2020.

When I use the variable in a textbox  like  = $(vMonthend_year_1) the result is -2000 (probably  30 minus 11 minus 2000)

When i use this expression in a textbox : date($(vMonthend_year_1) the result is 09-07-1894 (???)

All kinds of variations (with or without $  or use  " ") it doesn't help

I have to use this variable in a set analysis expression I kindly ask you to help me with this expression

{<fielddate= {"<= $(vMonthend_year_1)"}>}

 

A link to helpfull documentation about date variables would be appreciated to.

 

 

 

 

Labels (2)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

This is some alternative outputs if your system date format is YYYY-MM-DD

Vegar_1-1606314374592.png

 

 

Take a look at attached qvw

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

2 Replies
Vegar
MVP
MVP

This is some alternative outputs if your system date format is YYYY-MM-DD

Vegar_1-1606314374592.png

 

 

Take a look at attached qvw

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

curiousfellow
Creator III
Creator III
Author

Thank you very much, this helps a lot. 

It looks like the answer is in the use of $