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

unable to use <> in formula

Hi,

i am using the following formula but would like to add "ProdType<>'200021'".  I don't seem to be able to use "<>".  what should i be using?

ok:-

=Count(DISTINCT {<IsMember={'Yes'},[ProdTypeCode]={'Membership'}>}[AccountNo]&[AccountName]&[ProductClassificationSummary])-1


when i add "ProdType<>{'200021'}>" the formula doesn't work. 

=Count(DISTINCT {<IsMember={'Yes'},[ProdTypeCode]={'Membership'},ProdType<>{'200021'}>}[AccountNo]&[AccountName]&[ProductClassificationSummary])-1
 

Cheers,

Lc

11 Replies
Saravanan_Desingh

Please try..

=Count(DISTINCT {<IsMember={'Yes'},[ProdTypeCode]={'Membership'},ProdType-={'200021'}>}[AccountNo]&[AccountName]&[ProductClassificationSummary])-1

jagan
Luminary Alumni
Luminary Alumni

Hi,

-= this should used for not equal to. 

=Count(DISTINCT {<IsMember={'Yes'},[ProdTypeCode]={'Membership'},ProdType-={'200021'}>}[AccountNo]&[AccountName]&[ProductClassificationSummary])-1

It will show as syntax error but it will work.

Regards,

Jagan.

HirisH_V7
Master
Master

Hi,

You can use ,

=Count(DISTINCT {<IsMember={'Yes'},[ProdTypeCode]={'Membership'},ProdType-={'200021'}>}[AccountNo]&[AccountName]&[ProductClassificationSummary])-1 In Set Analysis



IF(ProdType<>'200021',Count(DISTINCT {<IsMember={'Yes'},[ProdTypeCode]={'Membership'}>}[AccountNo]&[AccountName]&[ProductClassificationSummary])-1)




HTH,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
Anonymous
Not applicable
Author

Hi,  thank-you but it is still not recognising the -= to section.  Nb. i have changed the name.  Any idea why please?

=Count(DISTINCT {<ProdTypeCode-={'200021'},IsMember={'Yes'},[ProdTypeCodeName]={'Membership'}>}[AccountNo]&[AccountName]&[ProductClassificationSummary])-1




 


Anonymous
Not applicable
Author

nope.  didn't work either ;-(

HirisH_V7
Master
Master

Hi,

Try like this,

(Count(DISTINCT {<IsMember={'Yes'},[ProdTypeCode]={'Membership'},ProdType-={'200021'}>}[AccountNo])+

Count(DISTINCT {<IsMember={'Yes'},[ProdTypeCode]={'Membership'},ProdType-={'200021'}>}[AccountName])+

Count(DISTINCT {<IsMember={'Yes'},[ProdTypeCode]={'Membership'},ProdType-={'200021'}>}[ProductClassificationSummary]))-1

Hope this is  what you required,

else

Can u post your sample and output required,

HTH,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
jagan
Luminary Alumni
Luminary Alumni

It will show error but it works.  It is a bug.

Regards,

Jagan.

Saravanan_Desingh

You can also try in combination with IF..

=Count(DISTINCT {<IsMember={'Yes'},[ProdTypeCode]={'Membership'}>} IF (ProdType <> '200021',[AccountNo]&[AccountName]&[ProductClassificationSummary]))-1

rubenmarin

Hi Laura, the '-=' option is showed as an error but it works. If you want to remove the error mark you can try with:

=Count(DISTINCT {<ProdTypeCode=P(ProdTypeCode)-{'200021'},IsMember={'Yes'},[ProdTypeCodeName]={'Membership'}>}[AccountNo]&[AccountName]&[ProductClassificationSummary])-1