on 2016 Feb 19 11:11 AM
Have a requirement when my actuals are 0, budgets too needs to be made 0.
The script logic goes by :
*XDIM_MEMBERSET AUDITTRIAL = BAS(LN)
*XDIM_MEMBERSET INTERNAL_ORDER = BAS(P_TOTAL)
*XDIM_MEMBERSET FORECAST_ACCOUNT = BAS (B_1000)
*XDIM_MEMBERSET COSTCENTRE = NO_CC
*XDIM_MEMBERSET CUSTOMER = BAS(ALL)
*XDIM_MEMBERSET VENDOR = BAS(ALL)
*XDIM_MEMBERSET VERSION = ACT
WHEN FORECAST_ACCOUNT
*IS*
*REC (EXPRESSION=%VALUE%==0 ? % %VALUE% * -1, AUDITTRAIL=REVERSAL, VERSION=BUD, CUSTOMER = NOCUS, VENDOR = NOVEN : %VALUE%)
I am getting syntax error: "missing: in conditonal expression"
Regards,
Shrini
Request clarification before answering.
Vadim,
The 3 line which consists budget value of 5000 has got actuals(3000 (1000 + 2000)) for GL account 23456.
However, GL account 35790 doesnt have any actuals assigned to it. Hence, we dont want it.
We only want budgets which has actuals.
Internal Order, Customer and Vendor are dimensions.
Internal Order is the driver dimension.
Budgets are always with No Customer and No Vendor Combination.
Actuals will have either Customer or Vendor assgined to it.
Let me know, if you need any more inputs.
Regards,
Shrini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I will try to explain myself:
For each account if:
Aggregate all records for this account for all customers, vendors and not clear about internal order for category ACTUAL. Do we need to separately aggregate each internal order?
If aggregation result is zero, then create reverse record for budget value.
Vadim
Vadim,
The aggregation is on Internal Order (Primary) and GL level.
I had given them the option of aggregating at Customers and Vendor level.
However, the client wants the Vendor and Customer information too.
Basically, they want to see Internal Orders that have actuals with the budget figures.
They dont want to see budget figures that do not have actuals.
Thanks & Regards,
Shrini
The code will be something like:
*XDIM_MEMBERSET AUDITTRIAL = AUDITFORBUDGET // AUDITTRAIL ID where BUD figures are stored
*XDIM_MEMBERSET INTERNAL_ORDER = BAS(P_TOTAL)
*XDIM_MEMBERSET FORECAST_ACCOUNT = BAS(B_1000)
*XDIM_MEMBERSET COSTCENTRE = NO_CC
*XDIM_MEMBERSET CUSTOMER = NOCUS
*XDIM_MEMBERSET VENDOR = NOVEN
*XDIM_MEMBERSET VERSION = BUD
*WHEN FORECAST_ACCOUNT
*IS *
*REC(EXPRESSION=(([CUSTOMER].[ALL],[VENDOR].[ALL],[VERSION].[ACT],[AUDITTRIAL].[LN])==0) ? -%VALUE% : 0,AUDITTRAIL=REVERSAL)
*ENDWHEN
Vadim
*REC(EXPRESSION=(([G_CUSTOMER].[ALL],[G.VENDOR].[ALL],[G_VERSION].[ACT],[AUDITTRAIL].[LN])==0) ? -%VALUE%, AUDITTRAIL=REVERSAL : %VALUE%)
The logic is that
For All customers and Vendors, Audittrail is LN Actuals that are 0
Budgets would be -1* value with AuditTrail = Reversal.
If false, there should be no change...
However, this throws an syntax error :" missing : in conditional expression"
Vadim,
When I use the logic as stated by you :
*REC(EXPRESSION=(([G_CUSTOMER].[ALL],G_VENDOR].[ALL],[GVERSION].ACT],[AUDITTRAIL].[LN])==0 ? -%VALUE% : 0, AUDITTRAIL = REVERSAL)
It creates records with 0 and AUDITTRAIL = REVERSAL, for the condition false.
I dont see any records for budget with negative sign in Audittrail - Reversal.
Regards,
Shrini
Vadim,
If
IO-GL-Vendor/Customer-Actual (Version)-LN (Audittrail) is 0
-1 * IO-GL-Vendor/Customer-Budget (Version) - V600 (Audittrial)
Else
Do Nothing
EndIf
Have created a member called Reversal in Audittrail to capture the reversal Budget figures, which would satisfy the above condition.
Created a parent 600 which has children V600 and Reversal.
Hope, this makes it clear.
Regards,
Shrini
Sorry,
But "IO-GL-Vendor/Customer-Actual (Version)-LN (Audittrail) is 0
-1 * IO-GL-Vendor/Customer-Budget (Version) - V600 (Audittrial)" - not clear!
Please write conditions line by line...
"Do Nothing" - not possible, you have to write something!
Can be:
0 - if you have no data in target
([...].[...],...) - tuple equivalent to target (write target over target)
Vadim
Hi Shrini,
The syntax is incorrect!
The correct syntax is:
*REC(EXPRESSION=(condition) ? ExpressionIfTrue : ExpressionIfFalse, DIM1=...,DIM2=...)
Dimension override can't be a part of ternary operator!
Please explain the logic you want to achieve!
Vadim
P.S. If you want to write to 2 different intersections - you have to use 2 REC lines with ternary operators!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Appreciated and thanks for taking out time to reply my query.
Had a hunch that you would respond to this query, as I have read about your notes on the ternary operator.
Let me illustrate the logic with an example:
IO FORECAST ACCOUNT CC CUSTOMER VENDOR ACTUAL BUDGET
100000 23456 NO_CC 12345 NOVEN 1000
100000 23456 NO_CC 98765 2000
100000 23456 NO_CC NOCUS NOVEN 5000
100000 35790 NO_CC NOCUS NOVEN 7000
Would like to have the first 3 lines and not the 4th one.
I would like keep budget values, which have actuals for Forecast Account but would like to delete or reverse (using AUDITTRAIL - Reversal) for budget values, which dont have any actuals or actuals are 0. (In this example Forecast Account 35790).
Hope, this makes it more clear.
Regards,
Shrini
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 7 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.