It is hoped to realize the display of the "circular period" value. For example, the value of the period in June 2008 will be displayed in the previous month: the order amount in May 2008, as shown in the figure below:
Use the PREVIOUS_PERIOD function.
The parameter is the indicator used for calculation, and the indicator must be an aggregate function or aggregate indicator. When the field dragged on the horizontal and vertical axis does not meet the calculation requirements of the function, the indicator will be marked in red.
previous_period(sum_agg(AMOUNT)): the "SIGNDATE" dragged by the user on the horizontal and vertical axis ("Year Month Day" grouping), then the calculation result of this indicator is that the "AMOUNT" is grouped and summarized according to the "Year Month Day", and then the data for the last day's amount is calculated.
Sample data: "Sales DEMO>FRDemo_ORDERS".
To calculate the "monthly circular period" amount, you need to change the grouping of the date indicator "SIGNDATE" to "Year Month", as shown in the following figure:
Add a new calculation indicator named "circular period", enter the formula: PREVIOUS_PERIOD(SUM_AGG(AMOUNT)), as shown in the figure below:
For the writing of functions, please refer to: Function Calculation Format.
You can drag the calculation indicator into the indicator column, so the circular period value in June 2008 is the amount of the last month: May 2008. For details, see Section 1.2 of this article.
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy