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

Trigger an action

Hi,

Refer to image below, I have a table which storing the outlet with the closure date. Besides, there are 2 selection box for year and month. The year and month are derived from another column called Report Date. There is no association between closure date and report date.

But this outlet table is associated with a fact table and fact table associated with Master Calendar.

What I'm trying to do is, is there any way to trigger an action where now I selected Year='2013' and Month = 'Jun', I want to exclude those outlet's closure date >= 2013 Jun.

Possible to do this is trigger action?

3.PNG.png

Regards,

CS Khoo

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

You can add an trigger on Report Date (Since Month and Year are derived from the same). The trigger will include a select in field trigger and the field will be "Closure Date" and the value will be 

='>$(=date(max(Report Date)))'


Hope this solves your query.


Thanks & Regards,

Basil

View solution in original post

6 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Sure you can do, add a button, write a text and add 2 triggers "Select field"

In the first write in the upper box: Year  and in the bottom 2013

in the second trigger Month and Jun

Obviously you can use variables for values so 2013 could be year(today())-1

Not applicable
Author

Hi,

Thanks. But I don't want to trigger the Year and Month, is I trigger the closure date which >= Selected Year and Month

Not applicable
Author

Hi,

You can add an trigger on Report Date (Since Month and Year are derived from the same). The trigger will include a select in field trigger and the field will be "Closure Date" and the value will be 

='>$(=date(max(Report Date)))'


Hope this solves your query.


Thanks & Regards,

Basil

Anonymous
Not applicable
Author

  1. Create 2 variable vYear, vMonth
    • vYear : =Only(Year)
    • vMonth: =Only(Month)
  2. Use a straght table for the table from your screenshot.
    • Dimension : Store Desc
    • Expression : Only({<Year=,Month=>}if(Closure Date<Date(Date#($(vYear)&'-'$(vMonth)&'01','YYYY-MMM-DD'),'DD-MMM-YYYY'),Closure Date)

You might want to adjust the date format to make it work, hope it helps .

Regards.

Not applicable
Author

Thanks. This is what I want.

Not applicable
Author

Chee Tiong, I know I can set in expression, but I don't want because I need to go through all the objects and expression, and that's alot. Thanks anyway. I did emailed to you also. =D