Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to set condition based on unique values using 2 lookup columns?

Good Day,

I please need assistance,

I wish to return either the Value 'R', or 'NR'

The File column has many unique values, and is accompanied by ALL with only 2 possible values.

To paint the picture, I want the dimension to tell me if the whole file is 'R' for ready, or 'NR' for not ready.

If all fields are populated with 'R', then the file is ready, but if just 1 'NR' is displayed on that specific file, then it must populate all fields to 'NR'.

***Remember, this must be done on a file level, so the fx must perform it's task per file and not on the entire column.***

Screenshot:

File R or NR.png

16 Replies
marcelviegas
Creator II
Creator II

I believe that the correct logic is Vishwarath Nagaraju made the 3rd comment.


try to study this method:

table_in_use:

load File,All

resident table_in_use

left join

LOAD File,

     Count(IF(MATCH(ALL,'NR'),1,0)) AS NewAll

Resident table_in_use

Group By File

noconcatenate

final_table:

LOAD File,IF(NewAll > 0, 'NR', R) As ALL

Resident table_in_use;

drop table table_in_use;

Anonymous
Not applicable
Author

Thanks Marcel,

Would you mind downloading the qvf I attached previously and incorporate the code as you have shown.

I think the quickest way for me to grasp this is to see the finished result and learn from there/make further amendments to my dimensions.

thanks

marcelviegas
Creator II
Creator II

Sorry, I can not help you, I'm without qlik_sense installed on my computer, only qlikview.
if you want to send me the script in txt I set it for you.

vishsaggi
Champion III
Champion III

Will look into this in the evening.

Anonymous
Not applicable
Author

vishsaggimarcelviegas‌ thanks for the effort you guys are putting in to assist me

vishsaggi
Champion III
Champion III

So sorry, completely got skipped to look into this. Can you remind me tomorrow please.

Anonymous
Not applicable
Author

vishsaggimarcelviegas‌ Thanks guys, played around abit more with the script you guys sent and I managed.

Thanks, keep well