This content has been marked as final. Show 1 reply
When you put this statement in the script:
SET vAge_Date =floor((floor(((Date - [Date naissance])/365)*12) + 0.49999)/12);
It sets vAge_Date to whatever the solution is using all of the dates in [Date naissance] and it won't change based on your selection.
I've never used FieldValue( before but I think that getfieldselections( might work for you but I don't think that would solve all your problems...
One thing you could try is doing something like...
LOAD [Label],[ID], min([Age]) as 'Min Age', max([Age]) as 'Max Age'
GROUP BY [ID],[Age];
And do like count(distinct aggr(if([Date naissance]=[Min Date],[ID]),[ID]))
(I'm assuming [Date naissance] means the day they were born?
I don't know if the aggr is right or if it's even necessary but I put it there anyway.
But I'm having a hard time understanding exactly what you want to do so... it's possible nothing I said is helpful