Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
i have an expression like this :
aggr(max(aggr(sum(NB_PLATEAUX),Date,UNITE)),UNITE)
And it's work : i have the max qty (NB_PLATEAUX) per day for the selection
Now i want the date when qty is max, with a set analysis but i don't know how write it...
Regards
Hi,I haven't tested but maybe:
Concat(Date(Aggr(If(sum(NB_PLATEAUX)=aggr(max(aggr(sum(NB_PLATEAUX),Date,UNITE)),UNITE), Date)
,Date)))
Concat is only in case there are more than one date with max sales.
If doesnt works you can also test adding a TOTAL:
Concat(Date(Aggr(If(sum(NB_PLATEAUX)=aggr(max(TOTAL aggr(sum(NB_PLATEAUX),Date,UNITE)),UNITE), Date)
,Date)))