
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
set analysis 'not equal to ' syntax
Hi All,
I want to achieve the foll: with set analysis
count of id where field a<> field b
i tried '<>' and '-='.
But, both did not work.
Please help me out.
Thanks,
Anju
- Tags:
- qlikview_scripting
- « Previous Replies
- Next Replies »
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i.e.
=
(count({<MPCS_WLDTI={'1','0'}, SDP_WLDTI={'1','0'},MER_MATCH_MASK={'3'},RUN_DATE = {'$(vMaxDate)'}>
- <MPCS_WLDTI={'1'}, SDP_WLDTI={'1'},MER_MATCH_MASK={'3'},RUN_DATE = {'$(vMaxDate)'}>
- <MPCS_WLDTI={'0'}, SDP_WLDTI={'0'},MER_MATCH_MASK={'3'},RUN_DATE = {'$(vMaxDate)'}>} distinct MTR_ID)
)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Anju,
Can you please provide a full example of the set analysis statement which you are using? What exactly is it you are trying to achieve with this Set Analysis statement?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
=COUNT({1<A<>B>}ID)
something like this.. but the syntax is wrong...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would rather do
count({$ or 1 <A = {"A<>B"} >} ID)
Fabrice

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Use syntax -= in set analysis and without set analysis expression <>
Example:
Count({<Country-={'U.S'}>})
Regards
Kaushal Mehta

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe this can solve your need
=COUNT({<A=A-P(B)>}ID)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try
if(A<>B, Count(ID))
and make sure , The Field Name are In same Caps, if You have field in Database like small a, and you use Capital A in set analysis,i will not work, qlikview is case sensitive...


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anju,
"-=" Does work for "not equal to" despite showing a syntax error. It will underline the statement in red, but the top of the Edit Expression bar will still read "Expression Ok" and it will return the correct data.
Regards,
Chris

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chris,
I tried this
=COUNT({1<MER_MATCH_MASK={'3'},RUN_DATE = {'$(vMaxDate)'},MPCS_WLDTI-=SDP_WLDTI>}MTR_ID)
it shows a red line under mtr_id , but returns the wrong answer..
it returns the answer satisfying only conditions for mer_match_mask & run_date and
ignores mpcs_wldti

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried this.But it did not work.
=COUNT({<MPCS_WLDTI=MPCS_WLDTI-P(SDP_WLDTI)}>}MTR_ID)

- « Previous Replies
- Next Replies »