End-of-Period Value
1. Overview
1.1. Application Scenarios
End-of-period value usually refers to the specific value of an indicator at the end of a specific time point (such as month-end, year-end, etc.). This value represents the cumulative result of all activities or changes over a period of time before that time point.
For example, in financial statements, end-of-period value is usually used to reflect the financial status and operating results of an enterprise at the end of an accounting period. By comparing the end-of-period values of different accounting periods, you can analyze the financial changes and operating performance of the enterprise.
1.2. Feature Introduction
In the value bar, click the field to be calculated for end-of-period value, and select "Advanced Calculation - End-of-Period Value" from the dropdown menu to pop up the setting box.
End-of-period value is used to calculate the value at a specific time point (such as year-end, quarter-end, etc.).
When there is a date-type field in the dataset, you can set advanced calculation - end-of-period value for the indicator, supporting the calculation of year-end, quarter-end, and month-end data.

2. Quick Start
2.1. Calculate End-of-Period Value
When There is a Date-Type Field in the Dimension Bar
When there is a date-type field in the dimension bar, the calculation will be based on the date granularity dragged into the dimension bar.
For example, if the time hierarchy dragged into the dimension bar is year and month, the calculation result for each month will be the value on the last day of the month. For example, for July 2020, the end-of-period value is the data corresponding to July 31, 2020.

The specific logic for other granularities is as follows:
Date Granularity | End-of-Period Value Calculation Logic |
Year | Data on the last day of each year |
Quarter | Data on the last day of each quarter |
Month | Data on the last day of each month |
Week | Data on the last day of each week |
Day | Data of the day |
Hour, minute, second | Not supported, null value |
When There is No Date-Type Field in the Dimension Bar
When there is no date-type field in the dimension bar, the calculation will be based on the granularity of the date field in the dataset itself, and a time filter (filter or card filter) is required to display the result.
For example, if the time hierarchy of the date field in the dataset is year and month, when the filter selects data for a certain month, the value on the last day of that month will be taken as the calculation result.

The specific logic for other granularities is the same as in 2.1.1 above.
2.2. Calculate Previous End-of-Period
Achieved by YoY/MoM - Compare with Previous End-of-Period. For details, please refer to [YoY/MoM - Achieving Previous End-of-Period Calculation](1-Year-over-Year and Month-over-Month.md#23-comparison-type).
2.3. Scenarios with Multiple Date Fields/Granularities
-
When there are multiple granularities of the same date in the dimension bar, they need to be arranged from largest to smallest, i.e., in the order of year => quarter => month => week, otherwise an error will occur and the calculation cannot be performed.
-
When there are multiple date fields in the dimension bar, you can select the date field to be used for calculation according to the actual scenario.

3. Usage Restrictions
-
Not supported for detail tables
-
Only supported when there is a date field in the dataset (newly created date-type calculated fields are also supported)
-
When the same date field with the same granularity is in the dimension bar at the same time, they must be arranged from largest to smallest granularity;
-
End-of-period value and previous end-of-period calculation are only supported for extraction, not for direct connection
-
When calculating previous end-of-period, you need to enable the Analysis Engine 2.0 switch (if this function is not available in YoY/MoM, you can contact the administrator to enable it in "Management Center - Advanced Settings").