elaine.novel
Contributor

Previous for a monthly result only.

Hi Team,

Is there a way I can use Previous but won't affect my previous or succeeding month?

Example:

Jan 1 - 1

Jan 31 - using Previous I will get 1

Feb 1 - 0 (should not get my result in Jan 31)

Feb 3 - 2

2月28日——使用前我将得到2

The previous will only get monthly result and will reset next month?

Thanks in advance,

Elaine

1 ACCEPTED SOLUTION

Accepted Solutions
KirillKuznetsov
Certified Master Anaplanner

Check out DAYSINMONTH function.https://help.anaplan.com/en/b20496fd-e761-4a00-a5b3-b9b105912ae5-DAYSINMONTH
You can try to adjust using it.
Regards, Kirill Kuznetsov
Planingo, LLC

View solution in original post

4 REPLIES4
tingtingxia
Frequent Contributor

Hi Elaine

You may need to use IF ELSE statement in this case. IF the date is a start of a month, you reset the value, ELSE you use PREVIOUS value.

Tingting
KirillKuznetsov
Certified Master Anaplanner

You can check out MOVINGSUM function with LASTNONBLANK aggregation argument applied.

https://help.anaplan.com/37394929-ea62-4e55-9655-b8c8c2732679-MOVINGSUM

But please note that LASTNONBLANK works with TEXT only. So first you will have to convert it to TEXT and then after calculation from text back again to VALUE.

The formula should look something like this (with an additional line item to be calculated - Days from start of the month):

VALUE(MOVINGSUM( TEXT(Line Item), Days from start of the month, 0, LASTNONBLANK))

Regards, Kirill Kuznetsov
Planingo, LLC
elaine.novel
Contributor

Hi KirillKuznetsov,

The problem with this is not every month shares the same days for me to use movingsum. Could you please illustrate how to make this work?

Thanks,

Elaine

KirillKuznetsov
Certified Master Anaplanner

Check out DAYSINMONTH function.https://help.anaplan.com/en/b20496fd-e761-4a00-a5b3-b9b105912ae5-DAYSINMONTH
You can try to adjust using it.
Regards, Kirill Kuznetsov
Planingo, LLC