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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple Expressions with Set Analysis

Hi there

I need to have set analysis on two expressions in my chart.  BUt it's not working.  Please help?

At the moment it looks like this.....

Expression 1 (Open) :

Count({1 <Active={"Open"}>} [Helpdesk number])  - Count({1 <[SLA status]={"SLA breached"}> }[Helpdesk number])

Expression 2 (Open Breached) :

Count({1<[SLA status]={"SLA breached"}> } [Helpdesk number])

11 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Remove the space between the 1 and the <

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
alexandros17
Partner - Champion III
Partner - Champion III

unfortunately  this part of expression

<[SLA status]={"SLA breached"}>

doesn't work with set analysis because the right element must be a unique  value not a field, that is you cannot compare a field (SLA status) with another field SLA Breached in this way but only using an aggregated function on the second field ex. Max([SLA breached])

hope this helps

Not applicable
Author

Thanks for your response Jonathan, but unfortunately it doesn't solve the issue.

Not applicable
Author

Thank you very much for you response Alessandro.

"SLA Breached" is not a field.  It's a possible value for the field [SLA Status].  Hope Im making sense.

alexandros17
Partner - Champion III
Partner - Champion III

You're right, sorry, I didn't notice the apex, in this case the syntax seems correct (Only try to replace double with single quotes " with ')

if it doesn't work take a look to data ...

(I suggest to create a flat table, then show all values)

Not applicable
Author

I've tried to use single quotes.  Still no difference. 

Not applicable
Author

For the first expression.... If I remove the second part (where I want to subtract), it works fine.

morganaaron
Specialist
Specialist

Does the second expression work?

Not applicable
Author

HI Aaron.

The second expression works perfectly.

I notice, that if I change the minus sign to a plus ( + ) or multiply ( * ) or divide ( / ), then it works.  BUt for the minus, it just gives me NOTHING .  I don't know if that carries some significance to the issue.