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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
mnev
Contributor
Contributor

Set Analysis where formula equals static number

Hi all, I am trying to create a formula with set analysis where it checks if a function is equal to a value. However, it is not working. My goal is as follows: IF Sum(Right([Field], 7)) equals zero then return value. Is there an issue with my syntax? Much appreciated.

=sum({<'0'={'$(=Sum(Right([Field], 7)))'}> } [Value])

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The left side of a modifier must be a fieldname. In your case, you will need use another field like an ID to select the rows and the formula as a filter. Like:

=sum({<ID = {"=Sum(Right([Field], 7)) = 0"}>} [Value])

Mind the double quotes around the formula. 

-Rob

View solution in original post

3 Replies
Saravanan_Desingh
MVP
MVP

Try something like,

=Sum({<[Value]={"=Sum(Right([Field], 7))=0"}>} [Value])

 

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The left side of a modifier must be a fieldname. In your case, you will need use another field like an ID to select the rows and the formula as a filter. Like:

=sum({<ID = {"=Sum(Right([Field], 7)) = 0"}>} [Value])

Mind the double quotes around the formula. 

-Rob

mnev
Contributor
Contributor
Author

Beautiful solution! Thanks

Community Browser