The use of variables in MAXL

I use Essbase server variables in a formula of contour.

Once, we move on Production, we cannot change anything in the Console.
I use StartPeriod and EndPeriod which are no later than 24 months during each month of loading.

(1) how can I use MaxL to recognize these variables?
(2) is where I can automate StartPeriod and variables EndPeriod of a file or a table of any function ETL?

Thank you

OH!

You want quotes around your subvar, literally. Sorry, I misunderstood this part. Here is how you do it:

@For /F "tokens=2,3,4 delims=/ " %%A in ('Date /t') do @(
   Set MN=%%A
   Set dy=%%B
   Set YY=%%C
)
echo %YY%
SET /A P2Y=%YY%-2
SET /A P3Y=%YY%-3
echo %P2Y%
echo %P3Y%
IF %MN%==01 SET StartPeriod=%P3Y%02
IF %MN%==02 SET StartPeriod=%P3Y%03
IF %MN%==03 SET StartPeriod=%P3Y%04
IF %MN%==04 SET StartPeriod=%P3Y%05
IF %MN%==05 SET StartPeriod=%P3Y%06
IF %MN%==06 SET StartPeriod=%P3Y%07
IF %MN%==07 SET StartPeriod=%P3Y%08
IF %MN%==08 SET StartPeriod=%P3Y%09
IF %MN%==09 SET StartPeriod=%P3Y%10
IF %MN%==10 SET StartPeriod=%P3Y%11
IF %MN%==11 SET StartPeriod=%P3Y%12
IF %MN%==12 SET StartPeriod=%P2Y%01

SET EndPeriod=%YY%%MN%
echo %StartPeriod%
echo %EndPeriod%

essmsh setVar.msh '"""%StartPeriod%"""' '"""%EndPeriod%"""'

Note the use of single quotes outside of each argument. They retain the double quotes (defined as part of the literal string) in the Maxl script

For more information on this, have a look here: http://codingwithhyperion.blogspot.com/2011/03/planning-tips-tricks-automating.html

Let us know how it goes...

Kind regards
Robb Salzmann

Tags: Business Intelligence

Similar Questions

  • The use of variables in the help of timelines

    I wonder how can I use this code for a nav to change the wire and outside the States.

    This line of code works.

    sym.getComposition () .getStage ().getSymbol("Section2") .getSymbol ("map_Popups") .getSymbol ("U SA") .play ("Over");

    I try to save every country in a variable, but do not work.

    sym.setVariable ("current2", "USA");

    sym.getComposition () .getStage ().getSymbol("Section2").getSymbol ("map_Popups") .getSymbol (current2) .play ("over");

    Now you need a getVariable() to read. Try this:

    sym.setVariable ("current2", "USA");

    get the variable

    var newCountry = sym.getVariable ("current2");

    sym.getComposition () .getStage ().getSymbol("Section2").getSymbol ("map_Popups").getSymbol(ne_wCountry).play ("Over");

  • The use of variables in the Calc scripts and business rules

    I'm sure that there have been previous discussions on this topic, but can anyone let me know the benefits of using variables in scripts of Calc and BRs?

    Thank you
    A
    I've never used variable Calc and after reading a guide to the study, which has talked about them, I didn't really understand the benefits.

    ^ ^ ^ I use variables all the time to make difficult abstract formulas. Here is an example.

    /*     Declare variables     */
    VAR varSalaryCosts ;
    VAR varProdOHLabXXXX ;
    VAR varXXXX ;
    
    A whole bunch of code here along with very limited FIX statement and then...
    
    "Salaried Labor"
    (
         varSalaryCosts = "Salary Costs"->"No Department"->"No Category"->"Salaried" -
                             "Wage Bonus"->"No Department"->"No Category"->"Salaried" -
                             "YYYY Retention Bonus 40%"->"No Department"->"No Category"->"Salaried" -
                             "YYYY 60% Ret Bonus Accrual"->"No Department"->"No Category"->"Salaried" ;
         varProdOHLabXXXX = "Number of Employees"->"ZZZZDepartments"->"Codes"->"Salaried" +
                             "Number of Employees"->"Blah Departments"->"Codes"->"Salaried" +
                             "Number of Employees"->"Humph Departments"->"Codes"->"Salaried" +
                             "Number of Employees"->"TTTT"->"Codes"->"Salaried" ;
         "Salaried Labor" = varSalaryCosts * ("Number of Employees"->"Salaried" / varProdOHLabXXXX) ;
    )
    

    The last formula is how the formula was described to me by the owner of the company. I find it much easier to read something like:

    "Salaried Labor" = ("Salary Costs"->"No Department"->"No Category"->"Salaried" -
                             "Wage Bonus"->"No Department"->"No Category"->"Salaried" -
                             "YYYY Retention Bonus 40%"->"No Department"->"No Category"->"Salaried" -
                             "YYYY 60% Ret Bonus Accrual"->"No Department"->"No Category"->"Salaried") *
                             ("Number of Employees"->"Salaried" /
                             ("Number of Employees"->"ZZZZDepartments"->"Codes"->"Salaried" +
                             "Number of Employees"->"Blah Departments"->"Codes"->"Salaried" +
                             "Number of Employees"->"Humph Departments"->"Codes"->"Salaried" +
                             "Number of Employees"->"TTTT"->"Codes"->"Salaried")) ;
    

    I used the TABLE in a calc script really-cool-but-alas-not-invented-by-me do better than planning made the conversion of currency currency conversion in planning. (How's that for a run-on sentence?) It is one of the six blog posts that I'm trying and I will end it soon, I hope. I am now thrash mode. It doesn't have its uses and I'll try to remember to update this thread when I'm done.

    Kind regards

    Cameron Lackpour

  • Problems with the use of variables at the time of the SV - Loudness.vi

    Hello

    I'm rather new to Labview and will have questions, get my Time-Varying Loudness calcuations out correctly. Attached is my current VI and a .csv file of my data set (calibrated in PA. sampling frequency = 50 kHz for 5 seconds). It does not produce what I expected when I run the VI. Here are my questions:

    Time-Varying Loudness:

    (1) what are the signals so much? There are hundreds of lines, but I only expect one.

    (2) why my category axis are not a range from 1 to 24 years as bark should be?

    1/3 octave Band Analsysis:

    (1) why is it incorrect? Them should not be a linear increase the frequency...

    Data on the one hand be hurry and make a squeek. It is a transient noise that happens about 2 seconds. But, how could I go do a waterfall (Time (s), Frequency (Hz), Amplidtude (sones)) of this signal? Is there an easy way? or do I have to do all three signals and add to make a parcel?

    Thank you very much for your help! Let me know if you need more infromation,

    -Troy

    p.s. I have included a picture of the results as well.

    Hi Troy,

    (1) the SV specific volume VI 'chunks' given in blocks of 2 ms and returns then these as individual plots specific Loudness vs. Sone.  The colored lines that you see in your chart are representative of the 2 500 2 periods of time ms in your acquisition of five seconds.  Each of these plots contains 241 points, however they are ten sample "gradually", one for each sone.  The digital filter buffer takes a bit to fill and kick in properly, however, so you can give your first rows (0-. 02 seconds or more) scrutiny before using them - you can see a number of unexpected zeros around the lower sones.

    2) since you use a chart, the x-axis will be increments every race following (the previous data is stored.)  If you only want to display the most recent data, I would recommend switching to a chart, which is found in the chart controls palette.  Also, see above (#1) why the x axis are longer than 24 points.

    (3) remember that dB is a unitless measure and cannot be used in reference to another value. A typical reference for sound is 20 uPa, but you will probably need even out your data entry and determine/set dB reference.  You can take a look at the voltage from the snout to the Cloaca EU.vi scale (EU means equalized units) and from the snout to the Cloaca Set dB reference.vi.  In your case, I think the plot of Octave shows your dB from a default value of 1.  The values should be accurate with respect to the other, but you must provide a reference value to calibrate the scale.

    (4) I think that this VI is a good example how to do to create a cascade:

    Display cascading for Octave (DAQmx)

    http://zone.NI.com/DevZone/CDA/EPD/p/ID/5562

    You will need to break up of your waveform into pieces, just like the specific volume VI, but the basic concept is roughly the same (take piece of waveform, take octave measure of the piece, add octave output measure cluster to cluster table, repeat for the rest of the waveform display)

    Phew!  It was a bit of information.  Let me know if this makes sense and don't be intimidated by the detail and/or unknown functions or methods - you're definitely on the right track, or to ask it to at least the right questions.

  • Can not get the use of variable function!

    Hi, I created an actionscript function that stops at an animation to a specific image that works very well. Then, I loaded in a php file with a variable that will contain the number for the frame I want to stop on the animation. It loaded fine and I loaded it into a function. what I can't do is enter the variable in the function that tells the animation to stop playing.

    Here is my code:

    load variables
    varReceiver = new LoadVars(); create an object to store the variables
    varReceiver.load ("http://playground.nsdesign6.net/percentage/external.php" "");
    load variables

    function1
    varReceiver.onLoad = function() {}
    value is the var that is created.
    var paul = this.percentage;
    }
    function1

    function2
    this.onEnterFrame = function() {}
    {if (this._currentframe == (Paul))}
    This.Stop ();
    this.onEnterFrame = undefined;
    }
    }
    Play();
    function2

    One problem lies in that you declare the variable in a function.  This limits the scope of this variable to the function. So that your enterFrame function can not see it.  Another thing you should consider is not the enterFrame function until the variable is read.  So while I would have suggested that you move the declaration of the variables of the function, maybe move the enterFrame function will have a similar effect...

    varReceiver.onLoad = function() {}
    value is the var that is created.
    var paul = this.percentage;

    this.onEnterFrame = function() {}
    {if (this._currentframe == (Paul))}
    This.Stop ();
    this.onEnterFrame = undefined;
    }
    }

    }
       
    Play();

    If this does not work, then just try to move the variable outside the function declaration and only assign its value it contains.  In this way, paul is visible in the second function...

    var paul;

    function1
    varReceiver.onLoad = function() {}
    value is the var that is created.
    Paul = this.percentage;
    }
    function1

  • Add two numbers without the use of variables?

    Hi, I have yet another simple problem that I tried to solve 10 different ways, and nothing works. I am trying to add up the numbers of two text entry fields when the user presses the left arrow key on the keyboard. I try to avoid typing just the names in the boxes of Var formatting text fields are slightly different. Here is my current code, I have attached to the button:

    on {(keyPress '< Left >')
    var WagerA = int (_root. AWager.text);
    var moderateto = int (_root. Ascore.Text);
    WagerA + moderateto;

    }

    Try to use...

    var keyListener:Object = new Object();
    Key.addListener (keyListener);

    keyListener.onKeyUp = function() {}
    If (Key.GetCode () == Key.LEFT) {}
    trace ("left"); use for testing

    Insert your code here
    }
    }

    Copy the following code will work for the left key, which will demonstrate the trace.  If it does not cover your data of textfield, then the problem is most likely with the textfields

  • Use of Variables in the statement of sym.play(1000)

    I built a system menu to a main menu with three options and a single submenu animation that should be limited to one of the three different places on the timeline, depending on which is click the main menu button.

    For each button in the main menu, I created a click made up of sym.setVariable event ("Subselection","#" ""); in "#" can be set to 1, 2 or 3.  When you click on one of the buttons on the main menu and the submenu opens at the end of this sequence, I inserted the following text - sym.play(1000) (subquery);

    It is all quite clearly displayed in the snap-in to display annotated below.

    It is important for me to master the use of variables and strings concatenated in the instruction of sym.play(1000) so I can create as compact as possible OAM files, so any help is greatly appreciated.  My guess is that I am a stupid syntax error, but I am not opposed to picking the brains of others when mine is insufficient for the task at hand.

    Thank you very much.

    Andy.

    Screen Shot 2014-03-13 at 10.22.01 AM.fw.png

    Hi Harley,

    Image labels are 1,2,3 etc.

    sym.setVariable ("Subselection", 0); in the composition of the scene ready

    Then in the menu, you can set the variable "Subselection" 1,2,3 and then call sym.play(1000) (sym.getVariable ("do"));

    Thank you and best regards,

    Roger Simon

  • use of variables?

    Hi all
    I'm new to obiee. Can someone help out me on the use of variables in obiee (DPR).
    Whats the difference between the repository and session variables. And also initialization blocks, static variables, dynamic variables? Help, please

    Hi Sai chand,

    variable easily value and we can do it everywhere where we need to use...
    variables to repository contains the value according to the given query block initialization.
    As soon Server BI starts these variables affected with values and depends on the refreshment of time we mentioned for these variables, each time mentioned, beer server run the query and assign values to the varaibels...
    Life for these variables is: as long as BI Server stops...

    Session variables are variable pre-defined as user, group, loglevel... etc.
    They are related to security.
    persistence for these variables time are as long as the session closed.

    If you give me your email ID, I will send you I about document variables.

  • Unable to concatenete string to the Variable in MaxL

    Hello

    can you help me please to concatenate a string with a variable in MaxL

    MAXL statement is:
    change application variable "VariableName", "Q1" value "APPL_NAME" $CurrYear;

    $CurrYear is a variable in Maxl with '_2010' value, so that the result should be a varialbe substitution in ESSBASE "VariableName" with the value "Q1_2010.

    Is this possible?
    I use ESSBASE 11.1.2

    Thank you very much
    Whitebaer

    What is

    Set CurrYear = '_2010;
    Set concatVar = Q1$ CurrYear;

    change the application 'APPL_NAME' set the variable "VariableName" $concatVar;

    or

    change the application 'APPL_NAME' set the variable "VariableName" Q1$ CurrYear;

    See you soon

    John
    http://John-goodwinb.blogspot.com/

  • How the names of variables and units used in the binary output file

    My colleague will give me LabView generated from the binary files (*.dat). There are more than 60 variables (columns) in the binary output file. I need to know the names of variables and units, which I think he has already configured in LabView. Is there a way for him to produce a file that contains the name of the variable and unity, so that I'll know what contains the binary file? It can create an equivalent ASCII file with a header indicating the name of the variable, but it does not list the units of each variable.

    As you can tell I'm not a user of LabView, so I apologize if this question makes no sense.

    Hi KE,.

    an ASCII (probably the csv format) file is just text - and contains all data (intentially) written to. There is no special function to include units or whatever!

    Your colleague must save the information it records the names and values in the same way...

    (When writing to text files, it could use WriteTextFile, FormatIntoFile, WriteToSpreadsheetFile, WriteBinaryFile even could serve...)

  • I want to fill and empty a tank automatically that can be achieved without the use of local variables?

    Labview gurus,

    I have a project to complete and I'm new to labview, I have the 2009 version of the student. and want to build an initial vi of a municipal plant to FILL AND EMPTY TANKS. I use the DSC module to help and I can get my tanks to complete a sequence, but it uses local variables. They cannot be shared on the network when I create my libraries.  Need urgent help...

    Casey74

    Here's a quick attempt at a state machine. See if it makes sense.

    (It can be simplified a bit more!)

  • How many times can I use a variable binding in a query of the VO?

    Is it possible that I can use a variable binding in a query of VO just once?

    I test a query that keeps throwing the Houston-27122 error by pressing the application module tester. I tried to limit the problem to the simplest possible case, and it seems that the error is caused by the fact that I use the same variable bind two or more times.

    When the query looks like this:

    query1.png

    I have run, enter 'x' and it returns me the result.

    When I change to:

    query2.png

    I have run, enter the value

    param.png

    and immediately get the error

    error.png

    The same thing in sqlplus runs without problem:

    sqlplus.png

    My version of JDev is build JDEVADF_11.1.1.9.0_GENERIC_150314.0718.6673

    Please, advise.

    P. S. where can I find documentation queries are supported in your? In particular, I'm interested if I can use WITH the clause. There seems to be some confusion on this matter (see, for example, Oracle SQL WITH clause support - JDeveloper and ADF)

    Thank you.

    It depends on:

    Open your VO in JDev and go the the query page.

    In the lower part, there is a drop down 'link type', it is usually set to "JDBC-positional. In this case, you will need to provide the bind value for each occurrence of the variable binding separately.

    You could change that to "named" (don't remember the exact name). But beware, this will also affect all relatioships master retail to others your. I think that this is not a good idea to change the style of binding to a single VO.

    Good bye

    DPT

  • Cannot use the #A01 substitution variable # in dynamic list

    Greetings...

    I want to generate a dynamic list on the page.  The list will contain an indicator that specifies whether or not the entry in the list is in fact hidden from the user.  If it is hidden to the user, then I want to apply a particular to this entry from the list class when rendering.

    The dynamic list has the following SQL code:

    SELECT null lvl,

           menu.menu_nm label_value,

           q'!javascript:$s('P32_MASTER_MENU_ID', '!' ||

              menu.menu_id || q'!');!' target_value,

           null image,

           null image_attribute,

           null image_alt_attribute,

           case when menu.hidden = 'Y'

                  then 'class="hiddenNode"'

                  else null end attribute1

    from ( select 'N' hidden, vis.* from std_vw_apex_menu vis

            union all

           select 'Y' hidden, hid.* from std_vw_apex_menu_hidden hid ) menu

    where menu.menu_ty = 'MAINMENU'

    order by menu.sort_order

    I then use a list template with the following as the entrance to the "current": list

    <li class="active"><a href="#LINK#"><span #A01#>#TEXT#</span></a></li>

    ... and list the following as the "Non-Current" entry:

    <li><a href="#LINK#"><span #A01#>#TEXT#</span></a></li>

    I see in the rendered however page result is that substitution does not, as it is shown in the following snippet:

    <li><a href="javascript:$s('P32_MASTER_MENU_ID', '18893191201');"><span #a01#="">Education</span></a></li>

    We are on ApEx 4.2.1.  What I'm doing wrong as I've seen other threads indicate that it is possible for dynamic lists to use substitution variables, as in their list templates.

    Shane.

    I found the solution to the attribute replacement does not not in the models of dynamic lists.

  • The use of the repository variable date in filter expression

    Hi gurus

    I get the error using repository variable date in filter expression. I use the formula below

    filter (with the HELP of Fact.calls"Sun Time".) ("' Fiscal months end date" = VALUEOF ("month_start"))

    I am getting below error

    The formula syntax is not valid.
    [nQSError: 10058] A general error occurred. [nQSError: 43113] The message returned by OBIS. [nQSError: 22024] A comparison is performed between incompatible types. (HY000)
    Publ. SQL: SELECT filter (fact. Calls by using "Sun Time" ". Fiscal months end date"= VALUEOF ("month_start")) 'call DATA.

    Then I tried the below format I still get the error

    filter (with the HELP of Fact.calls"Sun Time".) "" Fiscal month end date "= DATE'(VALUEOF ("month_start"))") "

    The formula syntax is not valid.

    [nQSError: 10058] A general error occurred. [nQSError: 43113] The message returned by OBIS. [nQSError: 46047] DateTime (VALUEOF("month_start")) (VALUEOF("month_start")) value does not match the specified format. (HY000)

    Publ. SQL: SELECT filter (using "Sun Time" Fact.Calls. ("' Fiscal months end date" = DATE '(VALUEOF ("month_start"))') 'call DATA.

    Please let me know what I'm missing or what is the correct syntax of same using the repository of date variable.

    Thanks in advance

    Concerning

    @li

    filter (with the HELP of Fact.calls"Sun Time".) ("' Fiscal months end Date" = CAST (VALUEOF ("month_start") date))

    Try this

    mark, if this can help

  • why we use the symbol $ java variable?

    his_$ account_tota, $ b... can u give an explanation for this variable. What is the symbol of $ use? Why we use the symbol $ java variable...
    I need a clear and simple explanation for example...: P

    No real reason, you can do it if you want. But you don't have to - I certainly didn't, and I rarely see code it does.

    You should take the time to find a way to find information. For example, I just typed 'java variable dollar' in google and ended up with this as the first shot:

    http://docs.Oracle.com/javase/tutorial/Java/nutsandbolts/variables.html

    I quote:

    "In addition, the character dollar sign, by convention, is never used at all."

Maybe you are looking for