Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
It seems simple, but I am missing something or doing it wrong. I have a chart with Months as dimension and I need to show the monthly sales on the maximum date of the relative months. I am trying something like :
Sumt( {<Date = {' $ (max(Date))'}> Sales}. Can you tell me where I am doing it wrong?
Regards,
Amit
Hi Amit,
Try this Sum( {<Date = {$ (=Date(max(Date)))}> Sales}
Rgds,
Sokkorn
you miss equal to sign.
Sum( {<Date = {' $ (=max(Date))'}> Sales}
or try this
i think miss the format of date. write your date field inside Date() function.
Sum( {<Date = {' $ (=date(max(Date)))'}> Sales}
Thanks both of you for your reply. I would request you to consider the dimension Month , because while I use the expression as in :
Sum( {<Date = {' $ (=max(Date))'}> Sales} it gives me one sales amount for the maximum date for max month, i want one amount for each months. Please have a look.
Regards
SET vMaxYear=MAX(Year)
Sum({<Year={$(vMaxYear)}, Date = {"$(=Max({<Year={$(vMaxYear)}>}Date))"}>} Sales)
Hope it will help u
regards-bika
Bika, It produces no difference, single value. Anyway, thanks for your try.
aggr(Sum( {<Date = {' $ (=max(Date))'},year={"$(=Max(Year))"}>} Sales),month)
No difference !
aggr(Sum( {<Date = {' $(=only (max(Date)))'},year={"$(=only(Max(Year)))"}>} Sales),month)
sum({$<year={"$(=Max(Year))"},month={"$(=Max(Month))"},day={"$(=Max(day))"}>}sales)
sum({$<year={"$(=Max(Year))"},month={"$(=Max(Month))"},day={"$(=Max(day))"}>}sales)
aggr( sum({$<year={"$(=Max(Year))"},month={"$(=Max(Month))"},day={"$(=Max(day))"}>}sales),month)
PFA and help.
Thanks in advance.