on 2018 Jan 08 12:42 PM
Hi,
I am trying to understand a custom formula that SAP made for my company in which a new MEASURE is created for its fiscal year.
IIF( [%GRPACCT%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="INC",
IIF( ([%TIME%].CURRENTMEMBER.PROPERTIES("2/CPMB/FQPQDSA")="X"),
-([MEASURES].[/CPMB/SDATA], CLOSINGPERIOD([%TIME%].[LEVEL02])),
IIF( ([%TIME%].CURRENTMEMBER.PROPERTIES("2/CPMB/SADA")="Q2" OR [%TIME%].CURRENTMEMBER.PROPERTIES("2/CPMB/PERIOD")="Q3" OR [%TIME%].CURRENTMEMBER.PROPERTIES("2/CPMB/PERIOD")="Q4" ),
-([MEASURES].[/CPMB/SDATA], CLOSINGPERIOD([%TIME%].[LEVEL02]))
+([MEASURES].[/CPMB/SDATA], CLOSINGPERIOD([%TIME%].[LEVEL02]).LAG(3)),
-([MEASURES].[/CPMB/SDATA], CLOSINGPERIOD([%TIME%].[LEVEL02]))
+([MEASURES].[/CPMB/SDATA], CLOSINGPERIOD([%TIME%].[LEVEL02]).LAG(1))
)
),
The second IIF is to check if it is the beggining of period (Q1).
I need to understand the last 4 lines of the IIF and the signs before MEASURES:
-([MEASURES]
+([MEASURES]
Is it making a substraction or addition?.
I understand that CLOSINGPERIOD([%TIME%].[LEVEL02]) is selecting the last sibling of the current Quarter.
Thank you very much in advance.
Request clarification before answering.
May be it's better to explain, what do you want to achieve with custom measure?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I appreciate the advice Vadim, I will remember it for the future and study the dimension properties you are talking about. But the request that I have is to explain this code (that they already have set up and working) to the client, I need to understand what are these lines doing in the formula.
Thank you very much.
| User | Count |
|---|---|
| 41 | |
| 4 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.