Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have an expression that shows me what the Max sales qty of a product was in a period of time.
max({$<[Barcode Stock] = >}aggr(sum({$<[Barcode Stock] = ,[Rolling Period Stock]={">=$(=vPeriodQuarterStartPast)<=$(=vRollingPeriod)"}>}[Qty Stock]),[Barcode Stock],[Rolling Period Stock]))
this works fine and returns the max qty of sales in the best period.....
what I want is an expression to show me which period the sale was in....
example:
Period | Sum of Qty |
---|---|
1 | 15 |
2 | 10 |
3 | 25 |
4 | 24 |
5 | 20 |
6 | 16 |
so my expression would tell me the max sales qty was 25, and i'm after an expression to tell me the period was 3.
Thanks,
Ben.
Thanks,
This works a treat!!
Cheers,
Ben.
Hi,
Slight issue though, with some of the products they have the same max qty in differentt periods so it is just returning an error...... any way i can add an if(expression = error,return latest max,return normal max)
Thanks,
ben.