Question on Formula

Highlighted
Regular Contributor

Question on Formula

Hi,

 

I'm trying to create a Line Item Formula in where every 10th of the Month/ or next business day, Money comes out of another Line Item. Please advice. 

 

Thank you 

4 REPLIES 4
Highlighted
Certified Master Anaplanner

Re: Question on Formula

Hello, 

 

There are 5 line items you will need to set up. I've attached screenshots below:

 

1) A line item that is populated with the current date. This will be the input to the logic described below

Austinv_0-1604428005978.png

 

2) A line item that uses the DAY() formula which returns the day # of the month

Austinv_1-1604428043124.png

 

 

3) A line item that uses the WEEKDAY() formula to return the number of the day of the week it is. (Monday = 1, Sunday = 7)

Austinv_2-1604428094392.png

 

4) A line item which calculates days till next business day (if the 10th falls on a Saturday or Sunday). This will have a condition that if it is a business day it resolves to 0

Austinv_3-1604428183511.png

5) Finally a boolean which will determine when the value should be pulled from the original line item to the new line item

Austinv_4-1604428266012.png

Below you will find the blueprint details

Austinv_0-1604428575302.png

 

 

 

 

 

 

Highlighted
Master Anaplanner/Community Boss

Re: Question on Formula

@neg177 

 

So, I have a slightly different way of doing than Austin did, but will get you home nonetheless.

 

Create a list of Days (Monday, Tuesday, Wednesday, etc...) with the code being the day of the week.

 

2020-11-03_13-33-28.png

Create a SYS Days Properties module with a line item called Add Days.  This will be entered by the admin, 2 for Saturday, 1 for Sunday:

 

2020-11-03_13-34-57.png

 

Create a SYS Time Day Module which is dimensonalized by Time at the Day level.

Line items:

  • Days of Week
    • formula: weekday(start()) formatted as Number
  • Day List
    • formula: finditem(Days, Text(Days of Week)) formatted as List
  • Day To Send Money - this could also be used for the last day money was sent
    • formula: IF DAY(START()) = 10 THEN START() + SYS Days Properties.Days to Add[LOOKUP: Day List] ELSE PREVIOUS(Day to Send Money)
      • formatted as Date
  • Send Money? - not sure if you need this, but if you want to filter the days that money was sent, this would be a good option.
    • formula: START() = Day to Send Money
      • fomatted as Boolean

 

2020-11-03_13-40-14.png

 

2020-11-03_13-43-09.png

 

 

 

Highlighted
Regular Contributor

Re: Question on Formula

very very helpful. Thank you guys!

Highlighted
Regular Contributor

Re: Question on Formula

yes, I got it and applied it to my formula and works great. ty again