Conditional calc script execution
Dear all,
I'm trying to implement a calculation that is executed only for entities that are flagged with a '1' on a technical account. The only solution that comes to my mind goes like this:
FIX (Entity1, Entity2, Entity3)
"TargetAccount"
IF ("ENTITY_FLAG" == 1)
SourceAccount;
ENDIF
ENDFIX
As there are hundreds of potential lines in the original calcuation, this may become a tedious task with unreadable code. Does anybody have an idea for a shorter or global alternative (for a whole calc script)?
Thanks in advance!
Regards,
Lars
Dear GlennS,
Thanks for your reply. TargetAccount and SourceAccount are always different. The one calculation block is the same for all entities. In simple but incorrect syntax the script would be like:
FIX (@IDESCENDANTS ("All Entities"))
/* Execute calc only if flag is set for respective entity */
IF (FLAG_ACCT == 1)
TargetAccount1 = SourceAccountA1 + SourceAccountA2
TargetAccountn = SourceAccountAn + SourceAccountAn
ENDIF
ENDFIX
As there are many TargetAccounts involved the correct IF/block syntax (as outlined in my initial post) would be pain to write and read. Any suggestions?
Regards,
Lars
Similar Messages
-
Maxl doesn't logout after Calc Script execution
Hi All,
I have a batch script which runs to load data and then aggregate data using calc script. Maxl completes the load and then starts the calculation execution but this never ends. I tried looking into the logs and it shows that Calc Script executed but it won't log off the user and so the next process of the batch doesn't kick-in.
Application Logs:
Thu~May~20~12:40:36~2009~Local~****~****~hadmin~Info~(1012579)~Total Calc Elapsed Time for ~Agg.csc~ : ~1008.66~ seconds
Thu~May~20~12:40:36~2009~Local~****~****~hadmin~Info~(1013274)~Calculation executed
Thu~May~20~12:40:36~2009~Local~****~****~hadmin~Info~(1019018)~Writing Parameters For Database ~[****]
Can anyone suggest me how to resolve the issue. Thanks...Hi Cameron,
The script which you had given was running just great in Dev with very less data, as the aggregation was just taking 10mins but when I moved the scripts to QA where it loads data from Prod, the aggregation takes almost 2 hours to run and just as the calc script finishes it throws an Network error and Maxl doesn't end the agg script and hangs there and is forced to log off from console after 60mins of inactivity. The hang doesn't let the batch to start the next process.
Network error for app logs:
Tue Jun 2 06:31:51 2009 Local TinP TinP hadmin Info (1012579) Total Calc Elapsed Time for Agg.csc : 7210.71 seconds
Tue Jun 2 06:31:51 2009 Local TinP TinP hadmin Info (1013274) Calculation executed
Tue Jun 2 06:31:51 2009 Local TinP TinP hadmin Info (1019018) Writing Parameters For Database TinP
Tue Jun 2 06:31:51 2009 Local TinP TinP hadmin Error (1042013) Network error 104 : Cannot Receive Data
Tue Jun 2 07:34:23 2009 Local TinP Info (1013220) Supervisor CONSOLE has forced user hadmin to logout
Can you suggest something. Thanks... -
Parallel calc script execution
Hi All,
We are having HP UX box with 4 processor and have 15 calc scripts. For parallel execution of these scripts We have set Calcparallel as 3 in .cfg file. My query is if these scripts are fired at the same time, will they going to execute in a seq. manner or in parallel fashion.
We have 11 dim. in which 10 are sparse and 1 is dense in our outline. We have analysed the log but could not figure out anything.
Any suggestions/guidance !!
Regards
-lenTo run three calc scripts simultaneously, you're going to need three people who kick it off in EAS/Excel/MaxL or more likely three separately yet simultaneously scheduled MaxL scripts that execute the calculations.
From a data integrity (or just your sanity) perspective, it is good that the three calcs are addressing different parts of the database.
However, from an Essbase data cache/disk controller perspective, the two are going to be spending a lot of time thrashing as Essbase tries to load blocks for all three calcs into and out of memory as the calculations proceed.
You may find that these processes are faster when they are truly run one after the other.
Of course the only way to really know is the benchmark both approaches and see what happens.
Regards,
Cameron Lackpour
Edited by: CL on May 16, 2009 5:57 PM
Whoops, three, not two.
Edited by: CL on May 16, 2009 5:57 PM
Whoops again, two referred to the data cache/disk controller, not the three calcs. I should not reread my posts and think that I can "improve" them. -
How do you stop multiple users executing the same calc script at the same time?
We have an issue when users uplaod a spreadsheet and then run a calc script. at one time we have multiple exectuions of the script running.
This slows up the system and we have to go cancel all the executions and run it again.
Can we stop this and put them on a queue, so only one execution of the calc happens at one time. Or stop multiple executions getting submitted at all.You could use EXCLUSIVECALC to stop more than one calc running at the same time, although this will apply to all applications on your server. And it doesn't just stop the same calc being launched twice. Easier than the alternatives I can think of though, if it works for you.
-
IF Statement with multiple ORs in Calc Script
Hello,
May I know what is the best way to script the following statement in a Member formula, not calc script (can't use Fix statements)
If (A->B->C == 1, 3 or 5 AND X->B->C == Value1)
returnvalue1
ELSE
#Missing.
Basically I am looking for syntax for an IF statement where IF one condition is equal to multiple values as mentioned, then the result is this...
Help is much appreciated. Thanks.
AdiYou won't be able to use a comma separated list, you'll have to repeat the combination. A->B->C == 1 or A->B->C == 3 so on and so forth
If you can give a use case scenario or the logic behind it then there are more chances that you might end up with a nicer solution.
Regards
Celvin -
Calc script prompt issue in workspace
Hello Gurus,
This issue is related to running Calc scripts from EPM Workspace 11.1.2.2.300.
Browser : IE8/IE9
We are facing an issue where users are able to run CALC from workspace successfully.
But they are not getting prompt as CALC XYZ ran successfully.
The browser just keeps showing CALC XYZ is processing. If we check in logs, its shows Calc has already completed its execution.
Can this happen if we have a slow network? Or is it a bug as the calc seems to be completing on the required time in the background (when checking logs) but the front process keeps going on.
Any help will be highly appreciated.
Thanks,
hyperionEPMHi Rahul,
Thanks for your quick reply..
Yes we are on planning 11.1.2.2.300
Following is what happens --
<li> We open workspace and login to a planning application.
<li> We navigate to the Business Rules from Tools.
<li> We then run the Calc script from within Workspace for that application
What happens is the calc should be running for ~ 3 mins (it runs for approx same time when we check the logs) however the workspace keeps showing that it is still in progress even if it exceeds ~10 mins, giving us a feel that the calc is still running which is not the case as the log file has the appropriate time when it completed.
We then have to manually close the UI which shows that the calc is still running as it had already completed.
Any ideas on what could be causing this?
Thanks,
hyperionEPM -
Hello Gurus,
I want to know what is the procedure/code in VBA for passing the calc scripts dynamically based on the selection.
For example:
X=EssVCalculate("Sheetname","Calc_Script name",True)
In the above code instead of the *"Calc_Script name"* I want a script which is called dynamically and the values are calculated accordingly.
Thanks in advance
SaurabhHi Todd,
This is the situation:
I have a calc script in Essbase which I can call to perform the calculations on the current sheet that is retrieved. I want calculation for the following formulas:
x = EssVCalculate("Sheet2", "CalcBC", False)
CalcBC is my calc script which is present in Essbase
So instead of passing the above script I want to pass the conditions dynamically in the VBA code . I don't want to mention the script name directly in EssVCalculate option
For example:
I have three drop down menus from which I would select three different( zero level )members. It would then retrieve the data for that particular values in the excel sheet and now when I click on Calculate button it should calculate the script dynamically.
I don't know how calc scripts can be executed dynamically in the VBA code itself.
Thanks in Advance
Saurabh -
I failed to use any Powershell script in Global Conditions with error 87D00327. The script is signed and tested without problem. Setting execution policy doesn't change the result at all.
Error message as below:
In-line script returned error output: File C:\Windows\CCM\SystemTemp\e7001c04-3966-46a7-9622-26c36d9c45de.ps1 cannot
be loaded. The file C:\Windows\CCM\SystemTemp\e7001c04-3966-46a7-9622-26c36d9c4
5de.ps1 is not digitally signed. The script will not execute on the system. Ple
ase see "get-help about_signing" for more details..
At line:1 char:2
+ & <<<< 'C:\Windows\CCM\SystemTemp\e7001c04-3966-46a7-9622-26c36d9c45de.ps1'
+ CategoryInfo : NotSpecified: (:) [], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException
ScriptProvider 6/23/2014 1:45:06 PM 2516 (0x09D4)
ScriptProvider::CreateInstanceEnumAsync - Script Execution Returned :1, Error Message:File C:\Windows\CCM\SystemTemp\e7001c04-3966-46a7-9622-26c36d9c45de.ps1 cannot
be loaded. The file C:\Windows\CCM\SystemTemp\e7001c04-3966-46a7-9622-26c36d9c4
5de.ps1 is not digitally signed. The script will not execute on the system. Ple
ase see "get-help about_signing" for more details..
At line:1 char:2
+ & <<<< 'C:\Windows\CCM\SystemTemp\e7001c04-3966-46a7-9622-26c36d9c45de.ps1'
+ CategoryInfo : NotSpecified: (:) [], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException
ScriptProvider 6/23/2014 1:45:06 PM 2516 (0x09D4)
Failed in discovering instance.
Script is not signed (Error: 87D00327; Source: CCM) ScriptProvider 6/23/2014 1:45:06 PM 2516 (0x09D4)
Failed to do HandleExecQueryAsync().
Script is not signed (Error: 87D00327; Source: CCM) ScriptProvider 6/23/2014 1:45:06 PM 2516 (0x09D4)
Failed to process CScriptProvider::GExecQueryAsync.
Script is not signed (Error: 87D00327; Source: CCM) ScriptProvider 6/23/2014 1:45:06 PM 2516 (0x09D4)
I can't figure out a way to capture the temp script file mentioned in the error message so I can't verify the script locally.
Any help will be appreciated.
Sean
Regards, SeanHi, Sean.
There was a product issue with signed PowerShell detection method scripts that has been fixed in R2 CU2. I just noticed it's not mentioned in the KB article for CU2. I'm not sure what happened here but I'll have somebody look into this.
Anyway, there's a couple of caveats to consider regarding this fix in your scenario. Firstly if you're creating a PowerShell script detection method you must not copy/paste the script text -- you need to "Open" it. Secondly, if you have any previously created
PowerShell script detection methods with signed scripts, you will need to re-add the detection script (again using "Open"). Finally, you must use an administrator console that's been updated to CU2 and a client that's been updated to CU2 for this fix to be
effective.
I hope this helps resolve the issue for you.
Check out my Configuration Manager blog at http://aka.ms/ameltzer -
Why does the calc script screen freezes after executing the script
Hello Everyone:
When a calc script gets executed, the calc Script in the ASS freezes even though the calc script has finished it´s execution. Does anybody knows why? How can i prevent these to happen?
Hope someone could help me, thanks in advanced
Best Regardsif you execute the calc script in foreground, console will freezes and it will not allow any thing to do.
Once script is completed, console will be freed.
You can execute the calc script in back ground so that you can continue your work and you can track the progress in the sessions. -
Need calc script help....
i have a cube which used to take more than 2 hrs to refresh (mbr + data load + calc time)
A dim name Version used to be as DENSE earlier and i changed it to Sparse..
no it takes less than an hour to build...
but one of the calc script is not working completely....
in that calc script there are some IF conditions where i check for the current month and for each month i do different calculations
but now i dont know why ...the calc is going to the JAN calc part even though the curr mnth is NOV in my cube...
Can anyone help me with this issue???fix(Entityx)
fix(("Fcst"))
fix(geo)
"FTE Amount"(
IF(@UDA("Period","CurrMth") == "Mar" or @UDA("Period","CurrMth") == "Apr" or @UDA("Period","CurrMth") == "May")
"Jan"->"FTE Amount" = 10;
Feb"->"FTE Amount" = 10;
so on till dec.
elseif(@UDA("Period","CurrMth") == "Jun" or @UDA("Period","CurrMth") == "Jul" or @UDA("Period","CurrMth") == "Aug" )
"Jan"->"FTE Amount" = 20;
Feb"->"FTE Amount" = 20;
so on till dec.
elseif( @UDA("Period","CurrMth") == "Jan") or ( @UDA("Period","CurrMth") == "Feb") )
"Jan"->"FTE Amount" = 30;
Feb"->"FTE Amount" = 30;
so on till dec.
elseif( @UDA("Period","CurrMth") == "Sep" or @UDA("Period","CurrMth") == "Oct" or @UDA("Period","CurrMth") == "Nov")
"Jan"->"FTE Amount" = 40;
Feb"->"FTE Amount" = 40;
so on till dec.
elseif( @UDA("Period","CurrMth") == "Dec" )
"Jan"->"FTE Amount" = 50;
Feb"->"FTE Amount" = 50;
so on till dec.
endif;)
endfix;
endfix;
endfix;
my currmnt is NOV....but i get values as 10 which should be the case when currmnt is mar or apr or may...
i even checked by individual IF's like IF(mar) do this....if(apr)....do this...
then its going to MAR... i dont know why..
CAn u help ?? -
I have a calc script I fix on few measures ie few dense dimension members and few sparse dimension members, my calc script look like this.
FIX( Dense dimension members, sparse dimension members )
" Actual " (
IF (CONDITION))
JEXPORT( )
ENDIF;
ENDFIX
For the same script if I FIX on actual , I mean
FIX( Dense dimension members, sparse dimension members, Actual)
" Actual " (
IF (CONDITION))
JEXPORT( )
ENDIF;
ENDFIX Now I am getting an error "Cannot calculate dimension member (actual ) with restricted member (actual)"
In this OTL Scenario is sparse dimension, Can any one tell me in terms of blocks ...what exactly happening behind the scenes..
Thanks in advance for your input.Hi,
When we fix sparse members, what we get is a fixed combination of index entries.
Meaning, its like this combination now can be assumed to act as another index entry (only imagine this), which either points to a block (if members from all sparse dimensions are fixed)
(OR)
if there are some sparse dimensions which haven't been fixed, this new entry can be a part of all unique combinations with the remaining sparse dimension members (which contain data), to point to block depending on the combination.
Now when you fix dense members:
Imagine a block, where you have fixed some dense members, this effectively slices and dices the block to a smaller block, which consist of the remaining dense members (i.e. the combination of the remaining dense members will lead to a cell in the block).
So when you fix both sparse and dense members you are effectively locking onto a block and also slicing it at the same time.
In the script you should't use "Actual" again as you have already fixed it, and you have brought your index down to lock onto a certain block, and when you again use "Actual" essbase is looking for another sparse dimension with the name Actual which is not possible.
Let me know if this makes sense.
THanks,
Anindyo -
How to reference current ICP in calc script?
Hello Everyone,
I am working on an HFM calc script. I am trying to assign the current ICP member to a variable. I attempted this using the following line of code:
POV_ICP = HS.ICP.MemberFromID(HS.ICP.IDFromMember(""))
I don't receive any error messages, but I don't seem to be populating the POV_ICP variable either.
Your help is greatly appreciated!
ChrisHa ha... Good one.
I came back to post A solution and low and behold - you arrived at the same...
You've probable realized that the POV_ICP was only ever going to reference the ICP_None account under any condition.
Glad to hear you're back on track - G'Luck
Public Const WriteToFilePath = "C:\Documents and Settings\Admin\My Documents\!WRITEtoFILE" 'Will write log to app server you are currently logged on to. Need to ensure this path exists on each app server
Sub WriteToFile(txtStringToWrite)
On Error Resume Next
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("C:\Documents and Settings\DemoUser\My Documents\!WRITEtoFILE\RulesLog.txt", ForAppending, True)
f.WriteLine txtStringToWrite & " " & Now()
f.Close
On Error GoTo 0
End Sub
'CALCULATE
SUB Calculate()
'Set current POV members
POV_YEAR = HS.Year.Member
POV_PERIOD = HS.Period.Member
POV_SCENARIO = HS.Scenario.Member
POV_ENTITY = HS.Entity.Member
POV_VALUE = HS.Value.Member
'Variables
vPeriodNum = Hs.Period.Number()
vPeriod = HS.Period.Member()
vScenario = Hs.Scenario.Member()
vYear = Hs.Year.Member()
vEntity = Hs.Entity.Member()
vValue = Hs.Value.Member()
vEntisBase = HS.Entity.IsBase("","")
IF vEntisBase = TRUE AND (vValue = "<Entity Currency>" or vValue = "<Entity Curr Adjs>" or vvalue = "[Elimination]") THEN
'Check for value in ICP
SET DataUnit = HS.OpenDataUnit("")
lNumItems = DataUnit.GetNumItems
FOR i = 0 TO lNumItems-1
'Get the next item from the dataunit
CALL DataUnit.GetItem(i, strAccount, strICP, strCustom1, strCustom2, strCustom3, strCustom4, dData)
CALL WriteToFile(POV_SCENARIO & " " & POV_YEAR & " " & POV_PERIOD & " " & POV_ENTITY & " " & POV_VALUE & " " & (strAccount & " " & strICP & " " & strCustom1 & " " & strCustom2 & " " & strCustom3 & " " & strCustom4 & " " & dData))
IF strAccount = "X" THEN
'Do Nothing
ElseIf dData <> "0" THEN
'' ElseIf dData = "1" THEN
END IF
NEXT
END IF
END SUB
This taken from the Rules.txt file...
Actual 2007 Jan EntityCashPool <Entity Currency> [ACashPool] WI [None] [None] [None] [None] 555555 2/1/2011 11:33:22 PM
Actual 2007 Jan EntityCashPool [Elimination] [ACashPool] WI [None] [None] [None] [None] -555555 2/1/2011 11:33:22 PM
Actual 2007 Jan EntityCashPool [Elimination] ICRecPayDiff WI [None] [None] [None] [None] 555555 2/1/2011 11:33:23 PM -
@ATTRIBUTESVAL works properly in Calc script but not in Member Formula.
We are using Essbase 11.1.2 –
"Global_Period" is a Dynamic Calc Member. Below is its Member Formula:
"ProjType " is an attribute (text) dimension.
"Global_Period" ="ValidAccount";
IF (@ISLEV ("Total_Expenses", 0) AND @ISMBR("HSP_InputValue") AND @ISLEV ("Version",0) AND
@ISMBR("No_GL_Account") AND @ISLEV ("Scenario",0) AND @ISLEV ("Years",0) AND @ISMBR ("Local")
AND @ISLEV("Tot_Org",0) AND NOT @ISIDesc ("Service_Division") AND @ISLEV("Tot_PRJ",0) )
"Global_Period"->"No_GL_Account"-> @CURRMBR ("Projects") =
1* "ValidAccount"->"Global_Version" ->"Global_Scenario"->&Budget_Year->"Global_Entity"->
"No_GL_Account"->"HSP_InputValue"->"Local"->
@MEMBER(@NAME(@CONCATENATE ("Proj_",@ATTRIBUTESVAL("ProjType"))));
ENDIF
The above Member- Formula is failed to work when opening a Data Form that contain "Global_Period".
The error messages in the log file are as follow:
[Thu Mar 1 16:55:39 2012]Local/Projects/Plan1/admin@Native Directory/1122748736/Error(1200370)
Error executing formula for [Global_Period] (line 1): attempt to cross a null member in function [@X]
[Thu Mar 1 16:55:39 2012]Local/Projects/Plan1/admin@Native Directory/1122748736/Error(1200370)
Error executing formula for [Global_Period] (line 0): attempt to cross a null member in function [@_VAL]
When converting the "Global_Period" to be a Store member.
The Calc Script below is exactly equivalent to the Formula, and run perfectly with no Errors.
"Global_Period" ="ValidAccount";
FIX ("HSP_InputValue", "Local","No_GL_Account", @RELATIVE ("Total_Expenses", 0),
@RELATIVE ("Version",0), @RELATIVE("Scenario",0), @RELATIVE ("Years",0),
@REMOVE (@RELATIVE ("Tot_Org",0),@IDESCENDANTS ("Service_Division")),
@RELATIVE ("Tot_PRJ",0))
SET CREATENONMISSINGBLK ON;
"Global_Period"
("Global_Period"->"No_GL_Account" -> @CURRMBR ("Projects")=
1* "ValidAccount"->"Global_Version" ->"Global_Scenario"->&Budget_Year->
"Global_Entity"->"No_GL_Account"->"HSP_InputValue"->"Local"->
@MEMBER(@NAME(@CONCATENATE ("Proj_",@ATTRIBUTESVAL("ProjType"))));
SET CREATENONMISSINGBLK OFF;
ENDFIX
For many reasons we prefer to use the Dynamic Calc Formula for "Global_Period".
As result of some checking I discover that the problem is with the function @ATTRIBUTESVAL,
because the formula has worked fine when I replace the @ATTRIBUTESVAL with a string.
Please help, what is the right way to write the formula in order to make it work.
Thanks
Tami KedemDear Cameron Lackpour,
Thank you very much, for your reply.
I'd given it a try, but it didn't help.
The purpose of this formula is as follow:
We holds 1's (ones) for allowable combinations of "Project_Type and Accounts", namely, each project type has different list of accounts that are allowed for input.
I need to populate the input 1's to all projects (and their children) according to its "ProjType".
The Data forms has periods in columns, thus by putting "Global_Period" (Hide) as the first column, and use "Suppress Missing rows" - for each project (on the "Page") , the form will show just the allowable Accounts in rows.
(we have around 300 Accounts, 50,000 members in Project dimension and around 25 Types of projects).
Please help.
Thanks!
Regards,
Tami Kedem -
How to make a calc script on a dense dimension ?
Dears,
I want to make a calculation script on a dense dimension where :
- I want to get an input from a member, then make a mathematical calculation , then populate the result in another member at the same dimension .
For More Clarification :
I have the following fix
CALC ALL ;
FIX ("SAR","Working.V01","Budget2012","FY12","G_10","NM_CAT01","Employee General","BegBalance")
"Internal Transportation" = "Monthly Transportation"*30 ;
ENDFIX
-Internal transportation and monthly transportation are 2 members on FB_account dimension (dense dimension) .
Waiting for your response, Thanks in advance.Dear ,
I appreciate your feedback . But, My problem is that after executing the calc script , No calculation happens .
by another means ,
-If I wrote "Internal transportation" = 500 ; --> It put 500 in it
-If I wrote "Internal transportation" = "Internal transportation" * 100 ; --> No calculation happened but it executed successfully
-if I wrote "Internal transportation" = "Monthly transportation" = 500; --> No calculation happened but it executed successfully
I don't know Why ??? -
The export file from a calc script - naming and date/time stamp
Here is a simple calc script to export data.
2 questions:
1. Is there an easy way to add a date/time stamp on the name of the data file so that it does not overwrite the older ones every time?
2. I tried to specify the path so that it write to another server. "\\mfldappp011\E:\Exp_AW.txt". It's not working. How should I specify the path ?
Fix (@Relative("Yeartotal",0),"Actual","Working",&ActualYear);
Dataexport "file" "," "C:\Exp_AW.txt" "#MI";
EndFix;
Edited by: user9959627 on Sep 7, 2012 11:25 AMProbably easiest to call the maxl script from a command line script, then rename the exported file to include the tme stamp and copy/move it to a location.
Cheers
John
http://john-goodwin.blogspot.com/
Maybe you are looking for
-
Multiple email accounts on my phone
Hi, Not to sure if anyone knows of a solution to this but any thoughts would be welcomed. I have about 5 different email accounts set up on my iPhone. I took the plunge and swapped my email from POP3 to IMAP, my thought was that especially as I now h
-
Why my sound button isnt working after upgrade to ios 6.1.3??
I recently upgrade my ios. And found out after that there's a sound bug. My ihone sound isnt working at all... Can anyone help...?
-
WoW won't recognize keys after update
I just installed 10.5.6, and now WoW won't recognize ' as a usable key in the game. So if I want to use it to make the character auto-run, it won't do anything. I can still assign the key to something, but the game itself won't register its use. Work
-
Hi, Can anyone please advise me the link for the following: Business Process Procedure document for HCM (Best Practice Scenarios).[Module wise PA,OM,TIME,Payroll,Benefits etc] Config document for HCM (Best Practice Scenarios).[[Module wise PA,OM,TIME
-
Having trouble deleteing call list
Can someone please help me out if possible. Is there a way to delete the recent call list all in one shot instead of doing it one by one. I have the 8330 curve with verizon. Thank you! Solved! Go to Solution.