Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
shahafei2
Creator
Creator

triggers - select based on expression

Hi all,

 

There is a way to set a trigger (OnChange of a variable - vMaxSales) that will select the required dates based on expression?

 

I would like to select the dates where the

sum(sales)<=$(vMaxSales)

 

How could i set it?

4 Replies
Gysbert_Wassenaar

Add a Select in Field action to the OnChange variable trigger of your variable. Use your date field as the field in which to select the values. And use as search string ='=sum(sales)<=$(vMaxSales)'


talk is cheap, supply exceeds demand
shahafei2
Creator
Creator
Author

Thank you

 

I tried to set it with an action "Select in field" but its not working for some reason

in the field i set "Date"

 

and in the search string i set

='=sum(Sales)<=$(vMax_Sales)'

shahafei2
Creator
Creator
Author

I success to make it by 

generation of a new resident table in the script

 

Daily sales:

Date,

Sum(Sales) as Daily_Sales

resident data

group by Date;

 

and than i set the (OnChange) trigger ("Select in field" action)  to:

 

Field:

Daily_Sales

 

Search string:

='<=$(vMax_Sales)'

Gysbert_Wassenaar

Perhaps the OnInput variable trigger works.

talk is cheap, supply exceeds demand