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: 
sakshikaul
Creator II
Creator II

using variable in expression

Hi

I am having an internal table as follows

InlinetableLastYear:
LOAD *
INLINE [

lastDate,event

10/12/2017,Diwali
10/10/2017,Durga Pooja

]
;

Here in the image below I have two variables

1st variable

1.compday(comparison no of days ) which is user defined variable which means when  the user will enter no. of days which he wants say 6 so the corresponding formula should be calculated as mentioned in variable 2

PAINT2.png

2. DaysOfcomp is a second variable which will calculate following formula

=(SoldDate)-compday

eg =(20171012)-6

it gives value as 43014

if taken this variable DaysOfComp in text box it will give value as 10/6/2017

now I am getting following values in charts for the expression given below

=Sum({<Sold_Date = {"=$(=Date(date(Sold_Date) - $(compday)))"}>} [inv value])

PAINT2.png


now I simply want the 2nd variable used here  DaysOfComp should be used in expression

if taken this variable DaysOfComp in text box it will give value as 10/6/2017

so I want to use variable DaysOfComp in the expression. I want to have sales for the date 10/6/2017 to be depicted in chart

Please help !!


0 Replies