Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

prahlad_infy
Contributor

Please helping me for one set expression .

Hello Sirs ,

how to be the expression to find count of previliged traders (EMP) which are having zero bidding_id during period selected .

with no change in present only  data model structure .


Thank you .

1 Solution

Accepted Solutions

Re: Please helping me for one set expression .

Try this

=Count({$<Trader_Name = {"=(Count({<Date_of_Bidding={[>=$(=Date(vStart_Date, 'DD-MMM-YYYY'))<=$(=Date(vEnd_Date, 'DD-MMM-YYYY'))]}>} Bidding_ID) + Sum({1} 0)) = 0"}, Marker = {"Previlaged"}>} DISTINCT Trader_Name)

View solution in original post

9 Replies

Re: Please helping me for one set expression .

What is the expected output based on the data within the sample and selections made?

prahlad_infy
Contributor

Re: Please helping me for one set expression .

Thank you sir for replying

My result should be

zeros.png


PIC FOR REFERENCE

zeros2.png


if you see in reference pic i am getting my results by doing filter in excel with two expression ,

i want a single set expression that should give me count in TEXT BOX  ,
all those trader which are privileged but have no complete bidding id in the period selected in calender box ..

Re: Please helping me for one set expression .

Try this

=Count({$<Trader_Name = {"=(Count({<Date_of_Bidding={[>=$(=Date(vStart_Date, 'DD-MMM-YYYY'))<=$(=Date(vEnd_Date, 'DD-MMM-YYYY'))]}>} Bidding_ID) + Sum({1} 0)) = 0"}, Marker = {"Previlaged"}>} DISTINCT Trader_Name)

View solution in original post

prahlad_infy
Contributor

Re: Please helping me for one set expression .

I think its not working properly . try range - 1/july/2018 to 12/nov/2018

zeros not working.png

Re: Please helping me for one set expression .

Yes, because between those two dates, all the Traders seem to have bid for at least 1 bid. Wouldn't that cause you to see 0?

prahlad_infy
Contributor

Re: Please helping me for one set expression .

Sorry sir i think , i made mistake , your solution is correct .. let me double check .

sergio0592
Valued Contributor II

Re: Please helping me for one set expression .

Sunny, can you explain why you use [ instead " or ' ?

Date_of_Bidding={[>=$(=Date(vStart_Date, 'DD-MMM-YYYY'))<=$(=Date(vEnd_Date, 'DD-MMM-YYYY'))]}>} Bidding_ID)


Thanks

Highlighted

Re: Please helping me for one set expression .

Since this whole thing is part of a bigger set analysis... I used [] instead of escape sequence

=Count({$<Trader_Name = {"=(Count({<Date_of_Bidding={[>=$(=Date(vStart_Date, 'DD-MMM-YYYY'))<=$(=Date(vEnd_Date, 'DD-MMM-YYYY'))]}>} Bidding_ID) + Sum({1} 0)) = 0"}, Marker = {"Previlaged"}>} DISTINCT Trader_Name)

sergio0592
Valued Contributor II

Re: Please helping me for one set expression .

Ok, understood. Thanks!