Additional Calculations
Listed below are additional calculations that have been added. Some overlap may exist with calculation engine v3 functions, but the entire set of calculations are documented here for completeness.
General
Function | Notes |
---|---|
isclose(first, second, [rtol], [atol]) |
This is based on the math function “isclose()”. Both the rtol and atol arguments are optional and default to 1e-09 for rtol and 0 for atol .Uses https://docs.python.org/3/library/math.html#math.isclose internally. |
Date
Function | Notes |
---|---|
currentdayinmonth() |
The day of the month in the current period |
currentdayinweek() |
The current day of the week, where Monday == 1 and Sunday == 7 in the current period |
currentdayinyear() |
The current day of the year in the current reporting period |
currentmonth() |
The current month of the currently selected period |
currentperioddatetimeutc() |
The current period in UTC as an Excel based integer |
firstperioddatetimeutc() |
Similar to the above, but for the first period only |
lastperioddatetimeutc() |
Similar to the above, but for the last period only |
currentyear() |
The year of the currently selected reporting period |
datetimeexcelformat() |
Similar to currentperioddatetimeutc() , but named correctly for what it returns. This uses the openpyxl package to calculate the correct date |
daysinmonth() |
The days in the month of the current period |
daysinyear() |
The days in the year of the current period |
islastdayofmonth() |
Returns 1 if it’s the last day of the month for the current period, otherwise 0 |
islastdayofyear() |
Returns 1 if it’s the last day of the year for the current period, otherwise 0 |
currentfiscalquarter([start_month], [start_day], [start_year]) |
The current fiscal quarter. This defaults to Australian, but can be overridden by providing the start_month , start_day and start_year |
currentfiscalyear([start_month], [start_day], [start_year]) |
The current fiscal year. This defaults to Australian, but can be overridden by providing the start_month , start_day and start_year |
daysinfiscalyear([start_month], [start_day], [start_year]) |
The days in the current fiscal year. This defaults to Australian, but can be overridden by providing the start_month , start_day and start_year |
isfirstdayoffiscalyear([start_month], [start_day], [start_year]) |
Returns 1 if it’s the first day of the fiscal year, otherwise 0. This defaults to Australian, but can be overridden by providing the start_month , start_day and start_year |
islastdayoffiscalyear([start_month], [start_day], [start_year]) |
Returns 0 if it’s the first day of the fiscal year, otherwise 0. This defaults to Australian, but can be overridden by providing the start_month , start_day and start_year |
numperiods() |
The total number of periods. |