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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

And condition in Set Analysis

Hi Guys,

In my attahced sample file. I want to make a chart for the users (AU ID) who have

SUM (Comments Posted in 4WKS) (> or < or >= etc) some  value

SUM (Comments Posted in 26WKS) (> or < or >= etc) some  value

SUM (Comments Posted in 52WKS) (> or < or >= etc) some  value

In order to get that I have created following variables

1. vCP4WKS: This has comparison signs as values

2. vCP26WKS: This has comparison signs as values

3. vCP4WKSValue This has value from 0 to 10 in dropdown

4. vCP4WKSValue This has value from 0 to 10 in dropdown

5. vCP4WKSCombined: This has value: =vCP4WKS&vCP4WKSValue

6. vCP26WKSCombined: This has value: =vCP26WKS&vCP4WKSValue

As I mentioned above I am trying to create a chart table for

Following Dimensions:

AU ID AND

First Name 

Following Expressions:

SUM [Comments Posted 4WKS] by using variable "vCP4WKSCombined" AND 

SUM [Comments Posted 26WKS] by using variable "vCP26WKSCombined"

My constraint is that I want to create these expressions by using Set Analysis and not the IF condition.

I have created expressions for both 4WKS and 26WKS but they are not working properly. Can some one look at them and help me out?

Please let me know if someone have any question or if there is any confusion.

Thanks,

TA

1 Solution

Accepted Solutions
MayilVahanan

HI

Try like this

SUM ({<[User Comments 4WKS] = {"$(vCP4WKSCombined)"}> * $<[User Comments 26WKS] = {"$(vCP26WKSCombined)"}>} [User Comments 4WKS])

SUM ({<[User Comments 4WKS] = {"$(vCP4WKSCombined)"}> * $<[User Comments 26WKS] = {"$(vCP26WKSCombined)"}>} [User Comments 26WKS])

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

3 Replies
MayilVahanan

HI

Try like this

SUM ({<[User Comments 4WKS] = {"$(vCP4WKSCombined)"}> * $<[User Comments 26WKS] = {"$(vCP26WKSCombined)"}>} [User Comments 4WKS])

SUM ({<[User Comments 4WKS] = {"$(vCP4WKSCombined)"}> * $<[User Comments 26WKS] = {"$(vCP26WKSCombined)"}>} [User Comments 26WKS])

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thanks Mayil,

It works. So I was missing " " before and after the variables 😞

Thanks again.

Not applicable
Author

Hi Mayil,

First of all "Marry Christmas"!!

As I posted in my previous note that set analysis works now, but I am still facing an issue in the expression in which I used the set values "0", is not being  recognized.

I have attached the same sample file with little bit more data. Now I have two chart tables one having  expressions by using if conditions and the other one having expressions by using set analysis. Everything is fine if I use the sign ">" when I use the sign ">=" especially against  value "0", set analysis does not show me any value which has "0" count, but if condition does.

Cna you please look into that. Am I missing something in the expression?

Let me know if you have any questions.

Thanks,

TA