Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
for each three-month period I have 3 possible date: 01/31, 02/29, 03/30.
Without filtering data I would have sum(VALORE_MAG) for the max(date) of each period (year, threemonth period)
DATA INVENTARIO= date
ANNO= year
TRIMESTRE= three month period
This expression is not correct because it extracts the maximum date throughout the period, not the quarter
sum({<[DATA INVENTARIO]={'$(=Max([DATA INVENTARIO]))'}, ANNO,TRIMESTRE>}VALORE_MAG)
for each T# i would like to have a value (valore trim mag) that is the value for the max(date) of the quarter.
How can I do that without filter data?
Thank you to all!
Hi,
Try this (if the quarter is in the dimension of your chart) :
sum ({$<DATA INVENTARIO={'$(=concat(aggr(max(DATA INVENTARIO),MESE),chr(39)&','&chr(39)))'}>} VALORE_MAG )
Regards,
Vincent
Try to aggr data by Anno and trimestre before sum ...
Thanks, how can i write it?
aggr(sum({<[DATA INVENTARIO]={'$(=Max([DATA INVENTARIO]))'}>}VALORE_MAG),ANNO,TRIMESTRE)
doesn't work...
Hi,
Try this (if the quarter is in the dimension of your chart) :
sum ({$<DATA INVENTARIO={'$(=concat(aggr(max(DATA INVENTARIO),MESE),chr(39)&','&chr(39)))'}>} VALORE_MAG )
Regards,
Vincent
It works! Thank you!!!
Could you explain me what do you do with $(=concat(aggr(max(DATA INVENTARIO),MESE),chr(39)&','&chr(39)))'?
As you have quarters in dimensions, aggr(max(DATA INVETARIO), MESE) will return 3 values, the last day of each month of the current quarter.
Then, I concatenate the 3 values but I want them to be separated by a single quote (ascii code 39), a coma (',') and another quote.
So I'm composing a string like 'month1','month2','month3' (the opening and closing quotes are before the $ and before the }).
Regards,
Vincent