Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Syntax for not equal in set analysis

I have been using the following syntax for not equal in set analysis for a long time now:

sum({$<Field-={'Value'}>} Fact)

The thing is that the syntax check thinks it is wrong somehow as it places a red underline under the - symbol and doesn't check the syntax in the rest of the calculation.

Does anyone know if this isn't the most desirable solution anymore?

11 Replies
RicardoRamos
Employee
Employee

I would say that the syntax is correct. The Syntax check is not perfect when validating Set Analysis.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Though it shows the red line, it works properly.

   Have a look at the attachment

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
ToniKautto
Employee
Employee

If the expressions works as expected even though the editor presents a red line, then it is most likely a SW bug and should be reported to QlikView for correction.

http://www.qlik.com/support

Not applicable
Author

@Kaushik.Solanki & Ricordo: I know it works just fine but when creating a more complex expression with multiple set analysis statements it stops checking the syntax when it encounters the first -= (not equal) statement.

@Toni Kautto: I spoke with my local QlikTech partner and they confirmed this behavior. They have reported this with QlikTech so I am expecting this will be resolved in a future service release.

Thanks for your reactions.

Not applicable
Author

Hello Marc,

Even though it works, there is a bug in QlikView that makes it appear as an error. To make it go away you can try:

sum({<Field = {'*'}-{'Value'}>}Fact)

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi,

This:

sum({$<Field = {'*'}-{'Value'}>}Fact)


and this:  sum({$<Field-={'Value'}>}Fact) are not exactly the same, however in most cases gives you the same result. This syntax bug has been present for a long time in several functions, It seems that QlikSense no longer has this bug (at list for -=, +=, etc)


regards

Not applicable
Author

Hi,

Try this:

Sum({$<Field=Field-{'Value'}>} Fact)

Best regards.

Not applicable
Author

!Hello Team

   i am using the following syntax for set analytics, it is not working fine. kindly let me know the correct syntax.

sum({<CUSTID-={[ALP]::CUSTID}>}TOTALSALE)

Desc

[ALP] is one group

PrashantSangle

Hi,

try this

sum({<CUSTID-={"[ALP]::CUSTID"}>}TOTAL SALE)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂