Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Expression help

Hi all,

I am wondering if anyone can help me please..

I have the following expression..

Avg ( {<[Job Type]={'Urgent H&S','Offline','Other','Paint'}, OrderComplete_Flag={'1'},Order_QueWIPFlag ={'N'},[SystemCompletedDate]={">=$(=date(Today()-28))<=$(=date(Today()-1))"}>} [Days to Complete(Accepted)])

i need to exclude 10+Operative Names from this average calculation but i didnt want to put all the names in the expression. I was thinking of maybe setting up a variable with the names in then using the variable in the expression but unsure how to do this,

Can anyone help please?

I have done this in the expression which seesm to work

Avg ( {<[Job Type]={'Urgent H&S','Offline','Other','Paint'}, [Operative Name]=-{'Name1','Name2'},OrderComplete_Flag={'1'},Order_QueWIPFlag ={'N'},[SystemCompletedDate]={">=$(=date(Today()-28))<=$(=date(Today()-1))"}>} [Days to Complete(Accepted)])

The field name is

[Operative Name]

Thanks

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

[Operative Name]=-{'Name1','Name2'} is a perfectly fine solution. If you want to use a variable it needs to contain a string like: 'Name1','Name2','Name3'. Including single quotes and comma's. You can then use the variable in the expression like this: [Operative Name]={$(vNames)}


talk is cheap, supply exceeds demand
hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Hi, thanks very much