Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
vanderson009
Creator III
Creator III

AND operator in QlikView

Hello folk,

Please any one tell me how to use AND operator in QlikView Set Analysis.

-- Thanks and Regards,

Villyee Anderson

1 Solution

Accepted Solutions
tresesco
MVP
MVP

=Sum({<Id=p({1<Year={2013}>})*p({1<Year={2014}>} Id)>}Sales)

PFA

View solution in original post

11 Replies
tresesco
MVP
MVP

'*' is used as AND (intersection) in set analysis. Like: =Sum({<First Set> * <Second Set>} Amt)

See : OR AND operators in set analysis

vanderson009
Creator III
Creator III
Author

Hi thanks for your reply

I am using this expression but it didnt work,

=sum({<Year = {2013}> * <Year = {2014}>} Sales)

I want those managers Id who has sales from 2013 and 2014.

-- Thanks

Villyee

its_anandrjs
Champion III
Champion III

Try like

=sum({<Year = { '2013' , '2014' }>} Sales)


Or


=sum({<Year = { 2013 , 2014 }>} Sales)


If sales want from 2013 to 2014.

tresesco
MVP
MVP

So there has to be a reference of manager field. try with p() element, like:

=Sum({<Managers=p({1<Year={2013}>*<Year={2014}>} Managers)>}Sales)

vanderson009
Creator III
Creator III
Author

Hi anand thanks for you answer,

but it didnt work, Coz i want that managers who did sale in both year, not either one of them.

-- Regarsd,

Villyee

vanderson009
Creator III
Creator III
Author

Hi,

I tried it but its not working.

-- Thanks and Regards,

Villyee

tresesco
MVP
MVP

Could you post your sample qvw explaining expected output?

rohan_mulay
Partner - Creator
Partner - Creator

Try dis. I think this can work .. if not try a bit modification .. m not sure abt this

=Only({<Sales=p({1<Year={2013}>*<Year={2014}>} Sales)>}ManagerID)

vanderson009
Creator III
Creator III
Author

Hi,

PFA Qvw application with dummy data,

In this i want only 101 and 104 Id's data cause it did sales in both year not single year.

-- Thanks and Regards,

Villyee