Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

need expression for max(date) and previous month same date sales

Hi,

Can anyone share me the max(date) sales and previous month same date sales.

when i select the date in list box,one column should show that date sales and one column should show previous month same date sales.

regards,

baru

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expressions

For Current month

    =Sum({<DateFieldName={"=$(=Max(DateFieldName))"}>} Sales)

For Previous month:

     =Sum({<DateFieldName={"$(=Addmonths(Max(DateFieldName), -1))"}>}Sales)

Hope this helps you.

Regards,

Jagan.

View solution in original post

2 Replies
Not applicable
Author

Hi, Please use the set expresiion for the previous month same day sales:

Sum({DATE_FIELD={$(=(DATE_FIELD-30))}}Sales)

If you have any problems, please provide the qvw with some data.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expressions

For Current month

    =Sum({<DateFieldName={"=$(=Max(DateFieldName))"}>} Sales)

For Previous month:

     =Sum({<DateFieldName={"$(=Addmonths(Max(DateFieldName), -1))"}>}Sales)

Hope this helps you.

Regards,

Jagan.