Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
angelsore
Contributor
Contributor

Compare different values with filter applicated

 

Hi all,

I'm trying to create a variable OK/ERROR that depends if one of the values in one table is equal to another value with the same filter then should put OK. If none match then it should put ERROR. This is my data example:

data.png

And it should be like:

data.png

For each OTR, if Gu.Denominacion=RegistroLWL.A1 then all this OTR OK. If not then ERROR.

 

Thanks!!!

1 Solution

Accepted Solutions
lfetensini
Partner - Creator II
Partner - Creator II

a) Remove Columns: GU.Denominación and RegistroLWL.A1 from the table;

 

b) Use this expression:

If(
 Aggr(
  Sum(
   If(
    DENO=REG,
    1)
  ), OTR) > 0,
'OK',
'ERROR')

 

Example_Error.png

Support your colleagues. Remember to "like" the answers that are helpful to you and flag as "solved" the one that helped you solve. Cheers.

View solution in original post

2 Replies
lfetensini
Partner - Creator II
Partner - Creator II

a) Remove Columns: GU.Denominación and RegistroLWL.A1 from the table;

 

b) Use this expression:

If(
 Aggr(
  Sum(
   If(
    DENO=REG,
    1)
  ), OTR) > 0,
'OK',
'ERROR')

 

Example_Error.png

Support your colleagues. Remember to "like" the answers that are helpful to you and flag as "solved" the one that helped you solve. Cheers.
angelsore
Contributor
Contributor
Author

It's exactly what I was looking for!!!

Thank you so much!