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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
PaoloGuerra
Creator
Creator

COUNT with multiple conditions

Hi all,

I have a counter with a specific conditioncount.jpg

 

Count({<userAccountControl={'66048'}>}userAccountControl)

But i need to add these 3 multiple conditions on the same function, but I don't know how I can do it.

If(AccountExpirationDate = '<>', AccountExpirationDate)

If(UserPrincipalName like '*direzione*' or userAccountControl like '*gfs*' or userAccountControl like 'servizi',UserPrincipalName)

If(Title = 'Dipendente' or Title like '*Esterno*' or Title like '*Consulent*',Title)

Can we help me please?

Thanks

 

 

Labels (1)
16 Replies
Channa
Specialist III
Specialist III

if(userAccountControl ='66048' and ( match(UserPrincipalName ,'*dire*') or match(UserPrincipalName , '*gfs*') or match(UserPrincipalName , '*serv*'))
and (Title='dependent' or match(Title,'Esterno') or match(Title,'cons')),count(userAccountcontrol))

 

it should work

Channa
PaoloGuerra
Creator
Creator
Author

Hi,

I have an error. I think is about dual if or not specified

2019-03-04_154755.jpg

 

Channa
Specialist III
Specialist III

if(userAccountControl = 66048 and match(UserPrincipalName, '*direzione*'),count(UserAccount))

 

can you check this

Channa
PaoloGuerra
Creator
Creator
Author

No results

no_r.jpg

 

if(userAccountControl = 66048 and match(UserPrincipalName, '*direzione*'),count(userAccountControl))
Channa
Specialist III
Specialist III

one last try

=if((userAccountControl = 66048 )and (UserPrincipalName like '*direzione*'),count(userAccountControl))

 

Channa
PaoloGuerra
Creator
Creator
Author

Good morning @Channa ,

same result. Not working 😞

 

Channa
Specialist III
Specialist III

add 2 new columns

 

 IF(lower(Title) like '*ester*' or lower(Title) like '*consu*','B1','B2') as TitleB,
   if(UserPrincipalName like '*gfs*' or UserPrincipalName like '*direzi*' or lower(UserPrincipalName) like '*servi*','C1','C2') as UserPrincipalNameB
 
after
=count({<UserPrincipalNameB={'C1'},userAccountControl={'66048'},TitleB={'B1'} >}userAccountControl)
 
 
Channa