Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
ganeshreddy
Contributor III

Can not use date function in set expression ?

Hi All,

I have a date field by the name DTM in my app, on searching for a particular date in list box i am able to find the field only after using '*' as shown in the attached.dates.jpg

I am using this field in a set expression and it is not returning values for matching DTM field value.

= Only({1< DTM = {"$(=vCurrentDt)"} >} Month)


so i decided to change the format of the field to date and that is providing error in expression.


= Only({1< date(DTM) = {"$(=vCurrentDt)"} >} Month)


I there any way that we can achieve this by making changes in application only and not data model.



Thanks,

Ganesh

3 Replies

Re: Can not use date function in set expression ?

What is vCurrentDt?

ganeshreddy
Contributor III

Re: Can not use date function in set expression ?

Hi Sunny,


The variable expression given below

vCurrentDt=if(GetSelectedCount(WorkingWeek2)=1,date#(date(WorkingWeek2+5),'M/D/YYYY'),num(Today()))

Re: Can not use date function in set expression ?

Not entirely sure, but may be this

=Only({1<DTM = {"=DTM = vCurrentDt"}>} Month)

OR

=Only({1<DTM = {"=DTM = $(vCurrentDt)"}>} Month)