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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pls, help me with set analysis

Hello

I need to show data in the table, excluding one of the specified conditions. I have such data:

Table:

LOAD * INLINE [

    Person, STUFF_ID

    Anna, 11

    Sam, 23

    Joy, 34

    Joy, 11

    Bella, 11

];

The user has set a condition: Person = Anna. I need to show in the table all of the people who have STUFF_ID = 11.

Help It's easy, but I can't remeber how to do it with SA ;(

1 Solution

Accepted Solutions
swuehl
MVP
MVP

To ignore a user selection, e.g. in field STUFF_ID, use something like

=Count({<STUFF_ID = >} Person)

or if you want to remove selection in Person:

=Count({<Person = >} Person)

or combine with a selection in STUFF_ID:

=Count({<Person= , STUFF_ID={11}>}Person)

View solution in original post

5 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

Dimension

Person

Expression

=count({<STUFF_ID={11}>} Person)

Regards

ASHFAQ

its_anandrjs
Champion III
Champion III

In Script side do with

Table:

LOAD * INLINE [

    Person, STUFF_ID

    Anna, 11

    Sam, 23

    Joy, 34

    Joy, 11

    Bella, 11

];

Query:

Load

Person,

STUFF_ID as STUFF_ID_11

Resident Table

Where STUFF_ID = 11;

Or on the Front end do with

Dimension:- If(STUFF_ID = 11 , Person)

Expression:- Count(STUFF_ID)

Note:- And select Suppress when value is null.

Not applicable
Author

thanks

but you can make a formula that does not specify exactly "11", and taking into account the user-selected STUFF_ID?

I mean such current selections:

Person=Anna

Stuff_ID = 'any value, I don't know value when I write SA formula'

111.jpg

I need to show in ANOTHER table persons who have stuff_id =11 also, but I can't remove condition Person=Anna.

swuehl
MVP
MVP

To ignore a user selection, e.g. in field STUFF_ID, use something like

=Count({<STUFF_ID = >} Person)

or if you want to remove selection in Person:

=Count({<Person = >} Person)

or combine with a selection in STUFF_ID:

=Count({<Person= , STUFF_ID={11}>}Person)

maxgro
MVP
MVP

count({$ <Person=,STUFF_ID={$(=concat(distinct STUFF_ID, ','))}>} Person)