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

Remove all instances of one column value based on another column's value

Hello all,

For a dashboard I am creating, we have a table of all, non-distinct records ID's in one column, and I am trying to remove all instances of this record ID if it has a value of "SPAM" for "topic" in a separate column.

For example, for REC_ID 123 below, since one instance of this REC_ID has the TOPIC = SPAM, I want to remove all rows with this REC_ID, and be left with the table underneath it.

REC_IDTOPIC
1234HEALTH
1234GENERAL COMMENT
1234SPAM
3456HEALTH
6788INFORMATION

REC_IDTOPIC
3456HEALTH
6788INFORMATION

Thank you.

5 Replies
pipuindia99
Creator III
Creator III

you can write the below expression for topic column.

pick(not match(topic,'spam')),topic

and add rec_id as it is

sunny_talwar

May be something like this:

Table:

LOAD * INLINE [

    REC_ID, TOPIC

    1234, HEALTH

    1234, GENERAL COMMENT

    1234, SPAM

    3456, HEALTH

    6788, INFORMATION

];

Check:

LOAD DISTINCT REC_ID as Check

Resident Table

Where TOPIC = 'SPAM';

FinalTable:

NoConcatenate

LOAD *

Resident Table

Where not Exists(Check, REC_ID);

DROP Tables Table, Check;

Anil_Babu_Samineni

Doe this you need Front - End ?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

Yes, I am trying to do this in a table on a dashboard

sunny_talwar

On front end, you can try to add set analysis to your expression like this:

Sum({<REC_ID = e({<TOPIC = {'SPAM'}>} REC_ID)>}Measure)

I am assuming your expression is Sum(Measure)