Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
mskusace
Creator
Creator

Permanently Filter Data Based on 2 Parameters

I posted a similar topic regarding filtering data based on a single parameter, but I am unsure of how to do 2 parameters.

I need to filter a data set based on the year and also a flag variable.

YEAR = 2018

FLAG = Y

Currently, I have the expression below which filters it by YEAR = 2018, but I am not sure how to incorporate the FLAG = Y in there. Any assistance would be appreciated!

=aggr(only({<[YEAR]={2018}>}[ORDER]),[ORDER])

 

Labels (2)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

I don't no where you are trying this? but you can simplify like below as condition and use Suppress when value is null or tick mark to the Include null values?

If(YEAR=2018 and Flag='Y', ORDER)

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

View solution in original post

6 Replies
Anil_Babu_Samineni

May be

=aggr(only({<[YEAR]={2018}, Flag={'Y'}>}[ORDER]),[ORDER])

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
mskusace
Creator
Creator
Author

I had tried that, but it did not work. I just tried again, still no luck.

Anil_Babu_Samineni

Do you need, Only these filters need to effect for Order? Or you want to show only 2018 where Flag Y should not include. How you want to incorporate here?

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
mskusace
Creator
Creator
Author

I ONLY want the ENTIRE row to show if YEAR = 2018 AND FLAG = Y.

If YEAR <> 2018 AND FLAY <> Y, do NOT show the entire row. 

I hope that clarifies.

Anil_Babu_Samineni

I don't no where you are trying this? but you can simplify like below as condition and use Suppress when value is null or tick mark to the Include null values?

If(YEAR=2018 and Flag='Y', ORDER)

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
mskusace
Creator
Creator
Author

I was over complicating things too much!

Thank you very much! Your solution got me exactly what I was looking for.