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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview RangeCount

Hi Guys,

Can any one help me out , please.

I am having a situation where i want to set the Result to "Yes" when there are "Y"  in Criteria in  3 consecutive months and which group by ID.

eg.

ID    Date      Criteria  Result

1      1/1/15        Y      

1      1/2/15        Y

1      1/3/15        Y        Yes       (1/1/15, 1/2/15 and 1/3/15  are Y in Criteria)

1      1/4/15        Y        Yes       (1/2/15, 1/3/15  and 1/4/2015 are are Y in Criteria)

1      1/5/15                               (Result resume = No as the Criteria  of 1/5/15 is null)

2      1/1/15        Y

2      1/2/15      

2      1/3/15                             (1/2/15 is nll, so the result is null)

I have tried below, but it doesn't work

=RangeCount(above(Total Count({<[Criteria]={'Y'}>}[Criteria]),0,3))

Thanks in Advance, Gurus

6 Replies
sunny_talwar

Try this may be:

=If(RangeSum(If(Criteria = 'Y', 1, 0), If(Above(TOTAL Criteria) = 'Y', 1, 0), If(Above(TOTAL Criteria, 2) = 'Y', 1, 0)) = 3, 'Yes')

Capture.PNG

Not applicable
Author

thx Sunny, but i got  this instead result.png

sunny_talwar

Do you just have ID as dimension or ID, Date and Criteria as your dimension?

Not applicable
Author

oh, yes. That's it.

it works now.

Thx Sunny

maxgro
MVP
MVP

maybe a check as

ID&Criteria & Above(TOTAL ID&Criteria) & Above(TOTAL  ID&Criteria, 2)

=Repeat(ID&Criteria,3)

1.png

sunny_talwar

Great