3 Replies Latest reply: May 25, 2016 7:34 AM by Yeo Poh sai

# Set Expression Month = {"<=\$(=max(Month)-1)"} Does not return last month sales

Hi All

Below expression return current month sales correctly :-

Sum(Aggr(SUM({

<

year = {\$(=only(year))},

Month = {"<=\$(=max(Month))"},

rEVENUE={rEVENUE}

>

}Amount*1)/\$(Columndim89)/1000, \$(ColumnDim101)))

I modify the above exoression to get the last month revenue as below :-

Sum(Aggr(SUM({

<

year = {\$(=only(year))},

Month = {"<=\$(=max(Month)-1)"},

rEVENUE={rEVENUE}

>

}Amount*1)/\$(Columndim89)/1000, \$(ColumnDim101)))

I get null value , can some one advise me where i go wrong ?

Paul

• ###### Re: Set Expression Month = {"<=\$(=max(Month)-1)"} Does not return last month sales

my qv doc

• ###### Re: Set Expression Month = {"<=\$(=max(Month)-1)"} Does not return last month sales

Try this:

Sum(Aggr(SUM({

<

year = {\$(=only(year))},

Month = {"<=\$(=max(Month)-1)"}, month, year,

rEVENUE={rEVENUE}

>

}Amount*1)/\$(Columndim89)/1000, \$(ColumnDim101)))

• ###### Re: Set Expression Month = {"<=\$(=max(Month)-1)"} Does not return last month sales

Hi Sunny

Thank you very much for your advise again. But i try your expression return 3374 , how to make it display 947  ? Same as Table 2

Paul