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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis Set1 AND Set2

I want to make a set analysis expression for the following pseudo code:

(

   (Column_A >= 5 AND Column_A <=12)

   OR

   (Column_C >= 20 AND Column_D <= 50)
)

AND

(

   (Column_X <= 5)

   OR

   (Column_Y >= 9)

)

This would lead to the following two set analysis expressions which should come together with an AND:

{<Column_A = {">=5<=12"}> + <Column_C = {">=20<=50"}>}

AND

{<Column_X = {"<=5"}> + <Column_Y = {"<=9"}>}

How can I replace this AND with the correct syntax in set analysis? Or do I have to rearrange the expression to make it work?

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello,

It seems to me kind of over-elaborated, but something like the following should work

Sum({(< Column_A = {">=5<=12"} > + < Column_C = {">=20<=50"} >) * (< Column_X = {"<=5"} > + < Column_Y = {"<=9"} >)} Amount)

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

View solution in original post

3 Replies
Miguel_Angel_Baeyens

Hello,

It seems to me kind of over-elaborated, but something like the following should work

Sum({(< Column_A = {">=5<=12"} > + < Column_C = {">=20<=50"} >) * (< Column_X = {"<=5"} > + < Column_Y = {"<=9"} >)} Amount)

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

That does the trick, thanks!

Was struggling with the 1 (set identifier) first. I want to indicate that it represents the full set. Leaving it seems to default to the current selection. Am I right?

Miguel_Angel_Baeyens

Hi,

Well, yes. Preceding the set modifier with the "$" sign or nothing means the current state of selections. Preceding with the "1" instead means all possible values for the dimensions in your chart (or all values if there are no dimensions) regardless of current selections.

Regards.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica