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

Variable in Front end

Hi all,

I am capturing a date variable from the front end and using it in an expression.That means the user is entering the date manually and based on that selection the expression is making the calculation.The default date is the max date

Expression:

count({$<Dates_IP= {'$(vDATE)'}>}CORE_ID_IP)

but I want to get the expression working for the last 7th day i.e vDATE-7 but not able to make the expression working.

Dates_IP is a date field whose format is like 2017-Jan-04

the vDATE definition in script :

LASTDT:

LOAD max(Dates_IP) as LASTDT

RESIDENT IN_PROGRESS_SUMMARY_TABLE;

LET vDATE = Date(Peek('LASTDT',0,'LASTDT'));

can some one please help me?

4 Replies
vinieme12
Champion III
Champion III

Try

count({$<Dates_IP= {"$(=Date($(vDATE)-7,'YouDateFormat')"}>}CORE_ID_IP)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
aniruddhyadutta
Creator
Creator
Author

Hi Vineeth,

I tried but unfortunately it didnt work.

However when In a KPI I am using the below expression I am getting desired result

Date(Date#('$(vDATE)','YYYY-MMM-DD')-1)

i.e 2017-Jan-03 (my vDATE entry is 2017-Jan-04)

vinieme12
Champion III
Champion III

what does =vDATE  show in a textbox?

try

count({$<Dates_IP= {"$(=Date(Date#('$(vDATE)','YYYY-MMM-DD')-7,'YYYY-MMM-DD')"}>}CORE_ID_IP)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
aniruddhyadutta
Creator
Creator
Author

2017-Jan-04 (i.e max date)