Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
DSDD
Contributor III
Contributor III

How to do set analysis, conditioned on variables?

Dear Community,

i want simply to count(ORDERS) omitting the second group/dimension, where both dimensions are conditioned on the users selection by variables.

DSDD_0-1604669143043.png

 count(TOTAL <MONTH>ORDERS) will do normally, BUT

both dimensions are conditioned on variables.

That means the first Dimension may change between DAY, WEEK and MONTH

and the second between CAT1 and CAT2 (having different categories).

The count(ORDERS) works and gives the number for the group.

Now i want the Order-Count of each MONTH (WEEK/DAY) omitting the CAT1-Subset (CAT2-Subset), resulting of course in the same number in each category for a MONTH (WEEK/DAY) .

I have no idea what the syntax may look like, tried several non working.

 

Thank you in advance

Labels (3)
2 Replies
MayilVahanan

HI @DSDD 

Try like below

count(TOTAL <$(vfirstDimensionVariableName)>ORDERS) 

Hope vfirstDimensionVariableName contains value similar to ur dimension (MONTH (WEEK/DAY))

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

Dear Mayil,

for some reason in this case, where the  groups (lets say: region and salesman) are a variable too, the code you mentioned is not working.

The TOTAL in this caes takes the count of all ORDERS irrespective any selection, irrespective $(vfirstDimensionVariableName)>. I think the reason is that the dimension for  bars is a variable (with the fields region and salesman). If i explicity state region in this dimension, than it works.

Do you have any idea, why its not working with a variable?