Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use a date variable as a selection criterium

Dear all,

I have the following data

let vFromDate = Floor (Date# ('2013-01-01', 'YYYY-MM-DD'));
let vToDate = Floor (Date# ('2016-06-01', 'YYYY-MM-DD'));


LOAD * INLINE [
    OFF_SWITCH_DAT, UVC_OMS
    4-1-2013, 12
    5-1-2013, 13
    6,1-2013, 11
];

And I have created a date slider linked to variable 'vInput1'

And now I create a straight table with the following expressions:


Count({<OFF_SWITCH_DAT ={'>=$(=Date(vInput1),'')'}>} UVC_OMS)
count({$<OFF_SWITCH_DAT_2 ={'>=$(=Date(vInput1),'DD-MM-YYYY') '}>}[UVC_OMS] )

Could anybody tell me why I still get a 0 value when I select 5-1-2013 in the date slider in the select column and 3 (so no filter) in the second one !

3 Replies
maxgro
MVP
MVP

If I understand your question try with

Count({<OFF_SWITCH_DAT ={'>=$(=Date(vInput1))'}>} UVC_OMS)

your expression in image

1.png

and this is my expression

2.png

raghvendrasingh
Creator II
Creator II

Hi,

May the syntax error in your load script:

LOAD * INLINE [

    OFF_SWITCH_DAT, UVC_OMS

    4-1-2013, 12

    5-1-2013, 13

    6-1-2013, 11

];

in last line After 6 there will be dash -  in place of comma.

In set analysis it doesn't take any date for that condition. then it giving zero.

Thanks

Frank_Hartmann
Master II
Master II

try:

Count({<OFF_SWITCH_DAT ={'>=$(vInput1)'}>} UVC_OMS)

hope this helps