Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

antonrus
New Contributor III

Ask two filters simultaneously.

Ask two filters simultaneously.

Hello!

(sorry I do not speak in English )

Try to set two filters at the same time , only one works . The situation is perhaps complicated by the fact that the report needed to compare data for different time periods (years) .

first filter :

sum ({ <CATEGORY_RU={'Sendvichi 15sm','Sendvichi 30sm','Salaty','Rolly','Beybi Saby','Sneki'}> } if (Day = DAYIsland, QUANTITY))

- Working correctly.

but if I add it to the second filter , output, over the past year - the filter does not work on the dishes - as if it is not.

sum ({ <CATEGORY_RU={'Sendvichi 15sm','Sendvichi 30sm','Salaty','Rolly','Beybi Saby','Sneki'}> } {<Year={"$(vPrevYear)"}>} if (Day = DAYIsland, QUANTITY))

For several days, I can not understand how to solve it . Thanks in advance !

12 Replies
jvishnuram
Contributor III

Re: Ask two filters simultaneously.

Hi Ahtoh,

why you want to use the if condition., that also get it done by the set analysis.,

sum ({ <CATEGORY_RU={'Sendvichi 15sm','Sendvichi 30sm','Salaty','Rolly','Beybi Saby','Sneki'}> } {<Year={"$(vPrevYear)"},Day={'DAYIsland'}>} QUANTITY)

antonrus
New Contributor III

Re: Ask two filters simultaneously.

Thanks for the answer!

But in the proposed version of the search - builds zeros ..

nilesh_gangurde
Valued Contributor

Re: Ask two filters simultaneously.

you can suppress Zero in the presentation tab.

kiranmanoharrode
Contributor III

Re: Ask two filters simultaneously.

Dear Ahtok,

try below Expression

=sum ({ <CATEGORY_RU={'Sendvichi 15sm','Sendvichi 30sm','Salaty','Rolly','Beybi Saby','Sneki'},Year={"$(vPrevYear)"},Day = (DAYIsland)>},QUANTITY))

Regards

Kiran Rode

+91 8976977897

antonrus
New Contributor III

Re: Ask two filters simultaneously.

There shows zeros and actually should be data zeros should not be.

nilesh_gangurde
Valued Contributor

Re: Ask two filters simultaneously.

If possible please attach the sample qvw.

-Nilesh

nizamsha
Valued Contributor

Re: Ask two filters simultaneously.

=sum({$<CATEGORY_RU={'Sendvichi 15sm','Sendvichi 30sm','Salaty','Rolly','Beybi Saby','Sneki'},Year={"$(=Max(Year)-1)"},Day={'DAYIsland'}>}Amount)

Or this one

=sum({$<CATEGORY_RU={'Sendvichi 15sm','Sendvichi 30sm','Salaty','Rolly','Beybi Saby','Sneki'},Year={'$(vPrevYear)'},Day={'DAYIsland'}>}Amount)

nizamsha
Valued Contributor

Re: Ask two filters simultaneously.

=sum({$<CATEGORY_RU={'Sendvichi 15sm','Sendvichi 30sm','Salaty','Rolly','Beybi Saby','Sneki'},Year={"$(=Max(Year)-1)"},Day={'DAYIsland'}>}Amount)

Or this one

=sum({$<CATEGORY_RU={'Sendvichi 15sm','Sendvichi 30sm','Salaty','Rolly','Beybi Saby','Sneki'},Year={'$(vPrevYear)'},Day={'DAYIsland'}>}Amount)

Based on Selection u want current year and last year mean

=if(Year= Max(Year),sum({$<CATEGORY_RU={'Sendvichi 15sm','Sendvichi 30sm','Salaty','Rolly','Beybi Saby','Sneki'},Day={'DAYIsland'}>}Amount),

sum({$<CATEGORY_RU={'Sendvichi 15sm','Sendvichi 30sm','Salaty','Rolly','Beybi Saby','Sneki'},Year={"$(=Max(Year)-1)"},Day={'DAYIsland'}>}Amount))

antonrus
New Contributor III

Re: Re: Ask two filters simultaneously.

reduced data file to be smaller. See tab dinamics (CH182)

Community Browser