Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
Qlik Insider: Product Roadmap Edition on March 3, 1 PM ET: REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression for a trigger in Alert Wizard

Hello,

I need to build a following trigger - on daily morning reload check weather sales data from last Friday are > 0 for a specific selection. If yes - send email.

What is the expression that would check my 'last Friday' sales data ?

Thank you.

4 Replies
brijesh1991
Partner - Specialist
Partner - Specialist

if(Sum({$<WeekDay={'Friday'}>Sales) > 0, 'Yes','No'}

You have to build WeekDay in your calender script

Anonymous
Not applicable
Author

Hi,

I didn't understand you requirement,

Why you want to check last Friday's data only , when you want you app to reload daily.

I think you should check your last day's sale on every reload.

This would be more beneficial.....

For that Create a macro to send mail and trigger it on post reload with condition

if(sum({$<SaleDate={$(=today()-1)}>}Sales)=0,True(),False())

Not applicable
Author

Hi Nitin,

this is a very good question of yours on why I want to check last Friday's data only.

I want to send weekly reports. Weekly means sales data from Monday to Friday. Due to some ERP problems last week data does not appear on Monday. Sometimes it does sometimes it does not. So I do reload on Monday, check if last Friday's data is in. If it is, I prepare last week report. If it is not, I do reload next day - Tuesday. And again - if last Friday data is in (which means also previous day is in) I can prepare and send sales report. If it's not there I need to wait for another reload on Wednesday (ERP data is pushed once a day at night).

Hope that clarifies.

Not applicable
Author

But I want to check only last weeks Friday

With this expression:

if(Sum({$<WeekDay={'Friday'}>Sales) > 0, 'Yes','No'}


I will get check on any Friday (e.g. a month ago) and the report will be triggered.