Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sakshikaul
Creator II
Creator II

variable declaration for comparison of no. of days

Hi

Here I want when the user will select an event like Diwali the corresponding date will be displayed in the field like below shown in image

PAINT2.png

now I want when user enters DaysofComp (as shown in fig) as -10 so the sale for (selected date -10 ) should be displayed ,

similarly if user enters daysofcomp as +20 so the sale for (selected date +20 ) should be displayed

Please help how to declare a variable (I need to make that variable flexible so that I can compare any values )

1 Reply
kingsley101
Contributor III
Contributor III

Hi Sakshi.

Please try the following:

Add a Variable event trigger

               To do this, go to document settings

               Triggers tab

               At the bottom, highlight the DaysOfComp variable

               OnChange - Add action

Select in Field

                   Add

                    Action Type: Selection

                    Action: Select in Field

                    Field: *Your Date Field*

                    Search String:

                                   =Date+ $(DaysOfComp)


Hope this helps

Thanks

Kingsley