Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All ,
How to show Count of ID which got 'OS' rating for two consecutive years in a Text Box ?
How to show Count of ID which never got 'OS' rating in a Text Box ?
Thanks
Shekar
Hi Shekhar,
This is a bit of fun but it works for the limited case of only three consecutive years being considered in your data.
Try:
=sum(aggr(if(
Odd(sum({$<Rating = {'OS'}>}Year))
and
count({$<Rating = {'OS'}>}Year) >1
,1,0),ID))
It doesn't count anyone with three consecutive 'OS' - that would be easy enough to take care of by nesting this inside another expression.
This takes advantage of the fact the the sum of two consecutive years is an odd number.
cheers
Andrew
Hi,
try like this in Text Box
=Count(DISTINCT Aggr((If(Above(TOTAL Rating,1,1) = 'OS' and Rating='OS',ID)),First_Name,Year,Rating))
Regards,
Antonio
wow... great workaround ...
...
BUT I HAVE REAL TIME DATA WITH 8 YEARS OF RATING
. AND WILL KEEP INCREASING
Hi Shekhar,
If you can give me data for more years I'd like to test this:
=Sum(
aggr(
if(Index(
concat(
aggr(
Concat(
Aggr(Rating,(Year,(Numeric, Ascending)),ID),'',Year),
ID)),
'OSOS')>0,1),
ID))
Cheers
Andrew
Hi Andrew ,
I cant share the data as is , but give me some time to create replica of it .
In the mean time , what should be expression for getting count of records WHO ONLY HAVE 'OS' RATING , in all of their appraisals .
Have You tried my expression ?
Hi Shektar,
Try:
=count({$-<ID = P({<Rating-={'OS'}>})>}DISTINCT ID)
Hi Antonio,
Your solution is neater than mine.
Cheers
Andrew
Thanks Andrew.
Regards,
Antonio
To make the solution more versatile, you might want to add the sorting parameter in aggr()?