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

Where is my mistake?

I want to create an alert that would display a list of providers for which the traffic is more than 1000 contexts and the share of 503 codes is more than 20%. For this I do this.

= 'on these providers, with traffic> 1000 contexts, the share of 503 code> 20%:'chr(10) &chr(10)& chr(13)&
Concat(DISTINCT{<provider={'=Count ({<[Code]={"503"},dir={"Out (*"}>}context)/Count ({<dir={"Out (*"}>}context)>0.2
and Count ({<dir={"Out (*"}>}context)>1000'}>}provider,  chr(13))

As a result, a list is issued at the output, in which this "Count ({<Direction = {" Out (* "}>} Context)> 1000 is displayed, and as for the criterion for the share of 503 code, I don’t understand how it works (i.e. very often providers are found for which the share of 503 codes is below 0.2)

 
6 Replies
tresesco
MVP
MVP

Without going much into the detail - a quick fix you can try. Try replacing single quotes with back quotes for set analysis part, like:

Concat(DISTINCT{<provider={`=Count ({<[Code]={"503"},dir={"Out (*"}>}context)/Count ({<dir={"Out (*"}>}context)>0.2
and Count ({<dir={"Out (*"}>}context)>1000`}>}provider,  chr(13))

 

vmonitor
Contributor III
Contributor III
Author

I have got the same resalt.  😞

vmonitor
Contributor III
Contributor III
Author

How can I write this condition using aggr and if?

vmonitor
Contributor III
Contributor III
Author

I have tried this one, but nothing changed. 

= 'on these providers, with traffic> 1000 contexts, the share of 503 code> 20%:'chr(10) &chr(10)& chr(13)&
concat(aggr(if(COUNT({<Code={"503"},dir={"Out (*"}>}[Call ID])/COUNT({<dir={"Out (*"}>}[Call ID]) > 0.2
and Count ({<dir={"Out (*"}>}context)>1000'}>}provider,  chr(13))

Brett_Bleess
Former Employee
Former Employee

The following Design Blog post may help in regard to AGGR and Set Analysis:

https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822

@tresesco  Just wanted to hit you up, as I know we have been having issues with the notifications on things, if you can think of anything else, shout.

Cheers,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
tresesco
MVP
MVP

Thank you @Brett_Bleess . 

@vmonitor , Could you please share a sample app where we can see the issue w.r.t.what you are expecting and what you are getting?