Summary:
How calculation fields work in P2P.
Instructions:
How To make a calculation Field:
- Click the dimension or measure you want to include in the calculation.
Popup will appear, where you can type the name and the formula
- Click the small arrow on the right to open the formula pane. All the available formulas are grouped by the area. You can also see the examples of the formula.
![](/sys_attachment.do?sys_id=ecf3aec21b2a2d503bd8eb97624bcb48)
Calculate difference between 2 dates:
- Difference in days between [Creation Date] and [Due Date]
- DATEDIFF(date_part, date1, date2, [start_of_week])
![](/sys_attachment.do?sys_id=a4f36ec21b2a2d503bd8eb97624bcb7e)
![](/sys_attachment.do?sys_id=e4f3aec21b2a2d503bd8eb97624bcb4c)
Logical Expression:
- If days from creation till due are over average cycle time days the invoice is arrived on time otherwise the invoice arrived late
- IF [CalculatedFieldExercise7] >= [Cycle time in days] THEN ‘Arrived On Time’ ELSE “Arrived late” END
![](/sys_attachment.do?sys_id=e0f36ec21b2a2d503bd8eb97624bcb80)
- Used to do something based on 1 value:
- Set target for each Company > Check your calculated field.
![](/sys_attachment.do?sys_id=e4f3aec21b2a2d503bd8eb97624bcb53)
- Used to check is field is empty:
- Check if Payment Date is Empty > Return true or false.
![](/sys_attachment.do?sys_id=e0f3aec21b2a2d503bd8eb97624bcb4e)
Aggregated function:
- Used to fixed an aggregated field:
- Sum the [Number of Records] on Company, no matter what is selected.
![](/sys_attachment.do?sys_id=e8f3aec21b2a2d503bd8eb97624bcb4a)