Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following expression that display the sum of Sale_Amount$ of previous month:
=Sum({<Year=,Month=,Date=, DateKey={">=$(=Num(MonthStart(Max(DateKey), -1)))<=$(=num(max(MonthEnd(DateKey,-1))))"}>} Sale_Amount$)
I would like to modify the 'less than' portion to give me the beginning of previous selected month in a number format.
For example: if the user selects Month-02.2017 than the calculation will take into account the following dates:
01-01-2017 till 31-01-2017
Thanks
Dear,
you can attach sample data set so that we can help you.
Thanks,
Mukram
Hi,
Try this,
In script write like as date(MonthName(datefield),'MM.YYYY') as mnth_year
and write expr like
=Sum({<mnth_year={"$(=date(addmonths(max(mnth_year),-1),'MM.YYYY'))"}>}Sales)
and take mnth_year field as filter.
Regards,
Try this.
=Sum({<Year=,Month=,Date=, DateKey={">=$(=Num(MonthStart(Max(DateKey), -1)))<=$(=num(MonthEnd(Max(DateKey),-1)))"}>} Sale_Amount$)
Rergards,
Kaushik Solanki
Attached is a sample report
I want to know if the calculation is correct