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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Nourrahmcnean
Contributor III
Contributor III

Multiple Conditions Set Analysis

Hello world!

I want to apply this condition (I want to exclude the online services and nbr of clients for Mobile services ) in a Set Analysis of a bar chart:

if (Service<>'Online' Or (Service='Mobile' AND TYPE_OPERATION<> 'Nbr clients' )) then  num(sum(TOT_COUNT),'# ##0')

I tried this Expression:  

num(sum({<Service-={'Online'},TYPE_OPERATION-={'Nbr Clients'},$(vSetPeriodPres)>}TOT_COUNT),'# ##0') 

But it doesn't print the wanted result.

 

 

Labels (2)
4 Replies
joaopaulo_delco
Partner - Creator III
Partner - Creator III

Hi @Nourrahmcnean !

           I think you shoud try this:

sum({<Service-={'Online'}> + <TYPE_OPERATION-={'Nbr Clients'},$(vSetPeriodPres)>}TOT_COUNT)

   

Help users find answers! Don't forget to mark a solution that worked for you!
sunny_talwar

May be need to add $(vSetPeriodPres) to the first set also

Sum({<Service -= {'Online'}, $(vSetPeriodPres)> + <TYPE_OPERATION -= {'Nbr Clients'}, $(vSetPeriodPres)>} TOT_COUNT)

There is another way to do this, but I can't remember the syntax properly. Will check it and get back

sunny_talwar

I think it might be this

Sum({(<Service -= {'Online'}> + <TYPE_OPERATION -= {'Nbr Clients'}>) * < $(vSetPeriodPres)>} TOT_COUNT)
Digvijay_Singh

May be something like this, but you added $(vSetPeriodPres), I don't see that in if condition so not sure how that will impact - 
num(sum({<Service-={'Online'}> +
   <TYPE_OPERATION-={'Nbr Clients'},Service = {'Mobile'},$(vSetPeriodPres)>
}TOT_COUNT),'# ##0')