Expression of variable QDR in OLAP

Hi all

Am very new to olap and bear nicely to the simplest questions, so I have a measure called the expression using below

OLAP_DML_EXPRESSION ('SCEN_VIEW_PRG (SLS_GROSS_SU)', DECIMAL)

where SCEN_VIEW_PRG is a custom program as below

-SCEN_VIEW_PRG

argument text T_MEASURE 'measure full name including the name of the cube

text variable T_FORM "name of the formula.

variable decimal D_RETURN "return value".

trap on ALLDONE noprint

T_FORM = joinchars ('SLS_CP_', T_MEASURE_ID)

switch SCENARIODIM

do

case 'L1_1 ':

D_RETURN = & T_MEASURE

breaking

case 'L1_2': 'LY '.

D_RETURN = LAG (SLS_CP_M1, 1, TIME, LEVELREL TIME_LEVELREL)

"D_RETURN = LAG (& (T_FORM (SCENARIODIM 'L1_1')), TIME_CP_LAG_PRIOR_YEAR, TIME_CP, LEVELREL TIME_CP_LEVELREL).

D_RETURN = & (t_form)

breaking

doend

ALLDONE:

return D_RETURN

I am facing problem to line 13, i.e. D_RETURN = & T_MEASURE

When I write D_RETURN = T_MEASURE it works, but it does'nt work when I write D_RETURN = & T_MEASURE it gives no error, but it does not also return a value, is - the correct syntax for the QDR variab

the fine expression suggesting

Thank you

Prateek

Hi David,

I think the argument in your example is not correct.  For example, it seems that the parameter that you pass to SCEN_VIEW_PRG may be the issue.  Given that the qualifier '&' means you want to evaluate the content of the variable T_MEASURE not the variable itself, you can switch to OLAP_DML_EXPRESSION ("SCEN_VIEW_PRG ("SLS_GROSS_SU")", DECIMAL).  Note that single quotes escaped around the parameter to SCEN_VIEW_PRG.

If you don't surround your parameter with single quotes then you shouldn't user the '&' in front of T_MEASURE, because in this case, you DO not want to evaluate the variable T_MEASURE.

Hope this helps,

Ken

Tags: Business Intelligence

Similar Questions

  • [Quebec] How to express the variable in this example?

    I want to know how to express this variable in this example in the red part

    / * Variable * /.
    $old = ['old'] $row_rs_archive;
    $new = $row_rs_archive ['new'];
    $total = old + $nouveau;
    echo $total;

    If (array_key_exists ('must', $_POST)) {}
    $done = mysql_query ("UPDATE cur_total SET temp = $total'") or die (mysql_error ());
    }

    works fine echo and enter the value total, but in the UPDATE command, it does not.

    I get this error

    1500 unknown column '$total' in 'field list '.

    notice of 1500 just echo $total

    Thank you...

    I took a quick glance, but I suspect it's because you use single quotes for the query string. PHP will not analyze the variables in single quotes, and he will treat it as a literal string.

    Try this:

    $done = mysql_query ("set a DAY cur_total SET temp = $total") or die (mysql_error ());

    If that is not quite get you there, try rather concatenation.

  • Expressions of QDR in OLAP cube measures calculated

    Hello everyone,

    I'm going crazy with a calculated measure in OLAP Analytic Workspace Manager, which is defined as an Expression of the following OLAP syntax:

    NVL (CUBE. MEASURE1 [DIM1 = 'A'], 0) + NVL (CUBE. Date2 [DIM2 = 'B'], 0)

    Where:

    CUBE. MEASURE1 and CUBE. Date2 are not calculated measures, they are stored measures.

    Dim1 and DIM2 are the edges of the CUBE, A and B values both exist in their dimensions.

    In most of my questions, the calculated measure retrieves the correct results, when two members of the sum gets the data. But I have other cases, the calculated measure retrieves null!

    In these cases, the calculated measure retrieves null when the CUBE. Date2 [DIM2 = 'B'] retrieves NO results. But I think that if none of the two expressions QDR retrieves no results, NVL function will be replaced by 0.

    I read about this, situations where the QDR expressions get no result, by default, it throws and error and non-null o NA value. I found that there are 2 options of ORACLE DML that can manage this type of situation:

    LIMITSTRICT = NO (http://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_options043.htm#OLADM384)

    OKNULLSTATUS = YES (http://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_options077.htm#OLADM418)

    I tried to create a DML function in the AW to define two options, first to NO, then Yes and returns 0, call this function with the instruction OLAP_DML_EXPRESSION ('MyFunc', NUMBER), but it does not work

    Exchange monitoring calculated like this: OLAP_DML_EXPRESSION ('MyFunc', NUMBER) + NVL (CUBE. MEASURE1 [DIM1 = 'A'], 0) + NVL (CUBE. Date2 [DIM2 = 'B'], 0)

    Please, I need a solution to bypass this, how can I catch these situations? Should I create a program of LMD to solve? Where I put this default option (LIMITSTRICT, OKNULLSTATUS) and put them in each measurement calculation?

    Thanks in advance for the answer.

    Great, you can not use a formula directly? No missing documents, such as observed earlier?

    For example the formula =

    IF (CUBE_MEASURE1 (DIM1 'A')) NAFLAG EQ 0 THEN CUBE_MEASURE1 (DIM1 'A') ELSE 0 + IF (CUBE_MEASURE2 (DIM2 'B')) NAFLAG EQ 0 THEN CUBE_MEASURE2 (DIM2 'B') ELSE 0

    If this expression does not work in a single formula, set rather measures 3 Meas1/2/3...

    (I generally prefer many formulas compared with olap dml program option in the mix...-online program looping on several other dimensions values is sometimes tricky to control/understand.)

    Meas1 = IF (CUBE_MEASURE1 (DIM1 'A')) NAFLAG EQ 0 THEN CUBE_MEASURE1 (DIM1 'A') ELSE 0

    and

    Meas2 = IF (CUBE_MEASURE2 (DIM2 'B')) NAFLAG EQ 0 THEN CUBE_MEASURE2 (DIM2 'B') ELSE 0

    Then set

    Meas3 = Meas1 + Meas2

  • Apex 4.2 newbie: dynamic action, PLSQL expression & bind variable

    Hello

    I'm in the Action page dynamic editing > settings-> Expression PLSQL.

    A test, I want to do a textfield equal to the value of another field. All of the remaining work, I need to do on my form is based on this capability, for example, if I can filter the content of my shuttle with a textfield. But for now, nice and simple: a textfield equal to another.

    The problem is that my link variable appears to return a null value when it's non-zero.

    Thus, for example, field entering the PLSQL Expression NVL(:P1_PAGE_ITEM_TEXT,'No') returns always 'no' to a textfield in the page. However, P1_PAGE_ITEM_TEXT is not null - I put a refresh on shot down and I am happily adding text... but the textfield shows simply "no".

    Googling, I see other people had similar problems a few years back and resorted to JS instead of PLSQL. But I think it's more likely that I'm doing it wrong that it's a bug! (Dynamic - Action Alert view the value in the field

    I would be grateful if someone could confirm that it is possible to do what I want to do - and how!

    Thank you
    Emma

    Published by: 995005 on March 21, 2013 05:46

    Published by: 995005 on March 21, 2013 05:47

    Construction IN is always a nasty...
    because you get: where id in "a, b, c" (where a, b, c is the value of P1_PAGEITEM)
    and you should get: where id in ('a', 'b', 'c')
    There is no easy solution for this. If you must certainly construction IN you "convert" the value of P1_PAGEITEM to a table (with a function in pipeline and apex_util.string_to_table). Just Google for a solution.

    Try to make it work with a single value first (before that you increase the complexity)

    And the definition of LOV should be: SELECT description, Àtable FROM returnvalue to display the description.

  • generator expressions multiple Variables GET conditional region.

    Hi all

    I hope someone can help (If master Günter Schenk thank your far in advance).

    I am at a loss with the selection of multiple variables for a conditional region IF.

    If there is a simple way for a person to give an example that would be great or please read below on what I am tring to do.

    What I need to do

    I have 2 images (1 is a button) with the command of one submission form, the other is just a message already sent to this user.

    When the form send it gets a unique result of generated URL for each of the presentations that I have to check agaist the IF conditional.

    So, if already present it button does not appear but the other saying you already sent message.

    The IF conditional is checked agaist a recordset using two of the main values of the URL that are VenueID and VFSENQI, but not checking the RandomEnquirySent.

    If the Recordset object checks the first 2 variables, which then produces the info to check the URL.

    Or another way to do this would be to check the

    Info

    Expression 1: <? PHP @$ row_rsCKEnqSent ['RandomEnquirySent']? > or @$ row_rsCKEnqSent ['RandomEnquirySent']

    That is the result of the database recordset based on below the URL that is submitted by a form.

    {GET. VFSRAND} IDENQ {SESSION. VFSENQID} IDVEN {GET. VenueID}

    Expression 2: be->

    <? PHP echo $_GET ['VFSRAND'];? > & IDENQ <? PHP echo $_GET ['VFSENQID'];? > & IDVEN <? PHP @$ _GET ['VenueID']? >

    or

    [@$ _GET ['VFSRAND'] & IDENQ@$_GET['VFSENQID'] & IDVEN@$_GET['VenueID "]"

    This is the URL paramiter sent to the database of unique to the message references.

    <? PHP echo $_GET ['VFSRAND'];? > & IDENQ <? PHP echo $_GET ['VFSENQID'];? > & IDVEN <? PHP @$ _GET ['VenueID']? >

    It is also the second part of the expression that should be removed from the URL & or a Session.

    Finishing

    So, if I know how to get the IF conditional to remove information from the URL to check the result recordset agast <? PHP @$ row_rsCKEnqSent ['RandomEnquirySent']? > I'd be a very happy man.

    Please let me know either or to see if it can or cannot be done I would be very grateful.

    Kind regards

    Joseph

    Another is important to keep in mind: What mix static strings (e.g. IDENQ) with dynamic values (e.g. $_GET ['VFSRAND']) inside the 'if' of a conditional region, the final result should be considered as a single string and must therefore be incorporated like the following, what - else - what is called "concatenation":

    method 1)

    $cond_combined = $_GET ['variable_1']. "" IDENQ ". $_GET ["variable_2"]. "" IDVEN ". $_GET ["variable_3"];

    method 2)

    $cond_combined = "{$_GET ['variable_1']} IDENQ {$_GET ['variable_2']} IDVEN {$_GET ['variable_3']}";

    Both methods work in the same way, the only difference from Dreamweaver, method 2 loses the colorization of PHP syntax for dynamic values that are wrapped in curly braces. Well, I´d personally consider cela a bug actually, but who am I to say ;-)

    However, I ve been playing with your stuff a bit using DW/uninstall. Please take a look at the attached screenshots and try to understand what I was doing and - in particular - * why * I did what I did

    See you soon,.

    Günter

  • Is there a way to enter a list of expressions in one variable?

    I have a query like this:

    SQL > select distinct t1.name of people join t1 t2 on t1.id = t2.people_id join who_likes_what leisure t3 on t3.id = t2.hobbies_id and t3.text ("music", "horses") Group of t1.name having count (t3.text) = 2;

    NAME

    --------------------

    Bob

    Amy

    (2 is the number of elements in ('music', 'Horses'))

    1. is there a way to set the list of expression in a single variable?

    "Having my brain turns off I had thought that if I created a (unique) string variable that contains the value '('Musique', 'Chevaux') ' I would be done.

    I understand why it may not work, but I don't know how to replace it with a single variable.

    I may not want to use (: var_1,: var_2,: var_n) because the number of items in the list expression is variable, and I use a prepared statement SQL.

    In the other thread, I've already been advised to use a single as string "music ~ horses and the following construction:"

    Select regexp_substr(:set_1 ||) (' ~ ',' [^ ~] +', 1, level) double txt

    but is there a way to do this directly?

    2. is there a function that returns the number of items in a list of expression?

    (to get 2 for 1 entry).

    Thanks for any suggestions.

    [Update: new tests, it seems that the PL/SQL function is not necessary!] I could link a collection directly to SQL, at least in 12 c. See my post below with details].

    Here is a simple example of a PL/SQL function that receives a collection, it uses SQL and passes the result to the caller.

    First of all, I'll use a collection type that is already defined: SYS.dbms_debug_vc2coll, which is defined as follows:

    create or replace TYPE dbms_debug_vc2coll is table of varchar2(1000)
    

    Now, here's a function that takes as input a collection of that type, and returns a REF CURSOR over the result set.

    create or replace function get_rset (
      p_inset in SYS.dbms_debug_vc2coll
    )
    return sys_refcursor is
      l_refcur sys_refcursor;
    begin
      open l_refcur for select * from table(p_inset);
      return l_refcur;
    end get_rset;
    /
    

    We can test this function in SQL * longer or Oracle SQL Developer:

    var v_refcur refcursor;
    
    exec :v_refcur := get_rset(SYS.dbms_debug_vc2coll('Music', 'Horses'));
    print :v_refcur;
    

    COLUMN_VALUE

    ------------

    Music

    Horses

  • How to remove Watch window expression?

    I have 8.5 Labwindows and it seems that I couldn't find anyway to remove the expression watch variables and many of them are no longer valid, but still remain. There is no delete command to delete variables. The section in GettingStart.pdf used to have a delete to the LabWindows previous command now disappeared. Is there a way to remove the variables because it's boring?

    Select the watch expression and press the delete key. I agree that it would be clearer if there is as well a menu item.

    A. Mert

    National Instruments

  • Groovy Expression not worked on jdeveloper 11.1.1.7.0

    Hi Experts,

    In my case, I created a simple display object which have variable bind. I'll put the link using Expression Groovy variable value.

    <Variable
        Name="empcode"
        Kind="where"
        Type="java.lang.String">
        <TransientExpression><![CDATA[adf.context.sessionScope.get('empcd')]]></TransientExpression>
      </Variable>
    

    but when I run the program in the module of application I get following error

    (oracle.jbo.jbotester.ErrorHandler$ ExceptionWrapper) Houston-29000: Unexpected exception caught: java.lang.NoClassDefFoundError, msg = Loracle/jrf/ServerPlatformSupport;

    Use same case worked on jdev 11.1.1.5.0 version but in the fact that this version error has occurred.

    My question is is this a bug on the jdev 11.1.1.7.0 version and what is the solution of this problem?

    Thank you

    Manish

    If you set the value to UserData with key 'empcd', you can access fi groovy with: adf.userSession.userData.empcd

    Dario

  • Variable session in error see filter

    Hello

    My guest by default current 12Weeks. I used the session variable in the prompt to capture 12 weeks (current week and courses + 12).

    so the default value is @{biServer.variables ['NQ_SESSION.]} {[PERIOD_STDATE']} where PERIOD_STDATE is my session variable.

    I use a view filter to display the applied filters.

    When the user opens a tab, filter is to launch error

    The syntax of the expression to be evaluated is invalid.* *.
    Expression: @{biServer.variables ['NQ_SESSION.]} {[PERIOD_STDATE']} *.

    My report works well. I have just the column date requested in my request for a report.

    When the user hits go on the prompt then the filter button view does so very well.

    No matter what I'm doing wrong? Why the sight of filter makes the result after hitting the GO button?

    Help, please.

    Thank you
    deep

    Hello

    1. define the default using the SQL logic. Select . of where . = valueof (NQ_SESSION.)
    2. you don't have to write the exact syntax for the opening of the session variable in the default values. You just need to use the session variable name after you select the type of session variable from the drop down.

    Hope this helped / answered.

    Concerning
    Young

  • By subtracting the Cp6 system variable?

    Hi all

    I shows the progress of the slide using the system variable $$cpInfoCurrentSlide$ $ $ $rdinfoSlideCount$ $

    But since I have a few slides 'ghosts' that are not actually part of the lesson (help of slides, etc.), I don't want to count them as part of the total number of slides.

    Unfortunately, Captivate is arithmetic applies to system variables (i.e. $$cpInfoCurrentSlide$ $ $$ rdinfoSlideCount$ $-3). That would make life so much easier in this case and many others.

    Anyway, I've tried (and failed) to create a new variable, assign the value of $$rdinfoSlideCount$ $ for the new variable and then subtract 3 from the new variable. Can someone explain please the right way to do this? Basically, I want to just display the value of $$rdinfoSlideCount$ $ minus 3.

    I couldn't find a close reference to what I'm looking for...

    http://forums.Adobe.com/message/4108450

    Anyone?

    Thank you

    Hello Doug,

    I agree, I wish that we could simply add expressions to variables as you suggested.

    Stem is correct on how it is done, but allow me to expand on his position.

    Steps to follow:

    1. go in project/Variables and create a new variable of user (a name that makes sense)

    2 save it (you don't need anything to other filled)

    3. go in Advanced Actions... and create a Standard Action and give it a name of Action that makes sense

    4. Add a new action, in the first column [action type] select Expression, in the columns section, select the user variable created in step 1 = variable (choose cpInfoSlideCount), select '-' and then select literal and enter the total number of slides that you do not want to remove the County.

    5. save it

    6. to view this new value, you must go to the slide and select Action: enter: perform advanced Actions and select Script (it is the name of your tip in step 3 Action

    7. Insert a text caption and add some text you need and then add select Insert Variable, which is the name chosen in step 1

    Fact.

    I hope I captured all the steps. I'm not near a computer and I'm half asleep. That's all for tonight.

    Take care of all, Shawn

  • Dynamic repository default Variable initialization

    Using Oracle BI (10.1.3.3.2) administration tool, I created a repository Variable Init block, the Data Source, the set as default initialization string:

    Select cast (trunc (sysdate)-1 date) of the double

    and associated with a target Variable, dynamic repository Variable, default initializer, generator expressions, the Variable defined without any error message like:

    DATE ' 2008-12-11.

    Whenever I have save the repository using the administration tool, this definition of the variable converts without warning to:

    TIMESTAMP ' 2008-12-11 00:00:00 '

    How can I stop the conversion of TIMESTAMP DATE in the default initializer?

    Use to_char in your sql instead of using the cast function. For tank allows you to mention the format.

    Select double To_Char(Sysdate-1,'MM/DD/YYYY').

    -Madan

  • OnDrawingCell seems to be to delete all cell values

    I paint a capable 2D on a report that I did successfully with the result I want. It may be important to note that all cell values are expressions, not channels. It looks like this:

    My final step is to change the background color based on the value of the cell.

    Following the example "to help for orders for trend displayed in user Tables", I saved a script separate with the new command and put in place a column to use. On the test of the script, all THE contents of header cell has not disappeared from the table! Now, it looks like this:

    The new user control is in the HealthCellBackground.vbs file as follows. Note that currently all the contents of the command is commented on, which would theoretically result in any changes to the table and theoretically could not be hidden in bugs.

    void TabHealthOnDrawingCell (context, cell)
    Dim dCurrVal

    ' dCurrVal = val (Cell.Value)
    ' <= 9="">
    ' If dCurrVal > = 100 then
    ' Cell.BackgroundColor.SetRGBColor (RGB (50, 150, 50))
    ' ElseIf dCurrVal > = 25 then
    ' Cell.BackgroundColor.SetRGBColor (RGB (175, 230, 200))
    ' Else
    ' Cell.BackgroundColor.SetRGBColor (RGB (255, 50, 50))
    ' End If
    ' End If

    EndSub ' TabHealthOnDrawingCell

    The command is saved as:

    ' Saves a user REPORT function,.
    ScriptCmdAdd("D:\LabVIEW\Project\DIAdem\HealthCellBackground.VBS")

    The content of the script for this column is:

    Set o2DTableColumnExpression = o2DTable.Columns.Item (2)
    Set oColBG = o2DTableColumnExpression.Settings.BackgroundColor
    oColBG.ColorIndex = eColorIndexFillEffects
    oColBG.RGBFilling = RGB (147,225,225)
    oColBG.RGB = vbGreen
    oColBG.GradientDirection = eColorGradientHorizontal
    oColBG.GradientMode = eColorGradientModeFromInside
    o2DTableColumnExpression.settings.OnDrawingCell = "TabHealthOnDrawingCell"

    Commenting simply on the last line of the final snippet above will restore the cell values. The above images were generated by enabling / disabling just that character of a comment.

    Just for mental health, I tried to use the command in the example, TabTrendOnDrawingCell_Case1, and he gave the same results. Based on the evidence so far, something goes wrong with the record, either it is the contents of the cell as expressions that cause the problem.

    Any ideas?

    Hi gizmogal,

    I have reproduced a table with the expression of group name in your message and also had problems until I changed the scale of the entire table to have the right fixed number of lines.  If all you have are expressions, there unfortunately no way around to a static number in the number of rows in the table.  The expression Root.ChannelGroups.Count works to the right of the expression in the configuration dialog box you posted, but it does not work in the global table scaling tab, and that has to be right.  By default, DIAdem paintings list of 10 lines - my guess is that you had less than 10 groups in the data portal when you got this error.

    All 3 of your table configurations are expressions, if you need to list them as expressions, not variables.  A variable would be the name of a global variable that contains the information you want to display.  Unless you have created the global variable and filled with the value you want to display, you cannot use a configuration of variable type.

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • Watch the value change?

    Hello

    Can someone advise me pls?

    Attached working vi essentially, but there is a gap in a case...

    Those in common express network variable signals Thermocouples... If the user close express signal in pc... This program value remains the last reading.

    If the user forgot to write to share variable signal express the value remains as last read...

    So how program this vi if the value is unchanged for some timing and prompt the user to verify respective shared variable...

    Pls help...

    Thank you and best regards,

    Brian

    You use data binding and the playback control.  If only, you should be able to read the shared, variable that should really be an indicator.

    Use the node sharing real Variable.  You can simply drag the variable of the project on your VI.  You can right click on this node to show the timestamp.  You can then just use a feedback node to hold the previous timestamp and compare it to the current timestamp of the sharded variable.  When it is modified, you can run your process.

  • Function PlotStripChart

    Hello

    I use the function 'PlotStripChart' to express the variables. I would like to see the two variables (data range is quite different.) in a single diagram.

    I tried to show each variables with traces, but it was difficult to see because of the different range of data values.

    Is it possible that I could define active the two Y-axises(Left and Right axis) for StripChart and bind variables to each axis?

    Thank you

    Insuk


  • parameter of subprogrammes?

    why we cannot declare data type size in the settings? What is the reason behind this...
    So declared that it returns error.
    Please can someone help me.

    Hello

    Rousseau wrote:
    For eample create procedure p_rac (in varchar2, par2 number par1)
    is

    My question is varchar2 and number data type sizes?

    why we cannot talk about size for data types?

    When you call a procedure, you have already mentioned the size of the arguments, when you said the variables you pass. (If you pass a literal or some kind of expression, a variable is implicitly created for her).

    I gave an example of this earlier, when I declared a variable called first_part. If you can not follow my example, give your own. After a full test of script sucessfully calls a procedure and sopmeone will indicate where the data types and sizes is mentioned (or implied) before the procedure is called.

Maybe you are looking for

  • do not save the App tabs

    Whenever I close Firefox, my app tabs disappeared on restart. I use Firefox 10 and the problem still persists. Is anyway to fix this?

  • Do not have "Toshiba HDD Recovery" on Satellite U300-151 with Vista

    I have problem with Vista - it became too slow so I want to get back to factory settings. I went through the process described in [http://aps2.toshiba-tro.de/kb0/HTD9102IR0000R01.htm] and then, instead of "Toshiba HDD recovery" as a last option-, I h

  • The vista updates are not safe to use?

    I recently had the problem of vista update loop. I managed to fix it get, but it's not as simple as that. I don't want it to happen again. so, can someone tell me what updates can cause it again? I read that kb937287 caused the problem. and so it wil

  • How to transfer videos, photos, etc. from my iPhone to PC?

    ·                                The operating system of my computer is Windows XP. And there are a lot of videos and photos to the iPhone, I'd like to copy on my PC. And as a novice of the iPhone, I don't have enough knowledge on this product. I'm a

  • Pavilion ze1000 cmos battery location.

    Hi all, can any kind person tell me where exactly the Cmos battery is located in a mobile Pavilion ZE1000, bought second-hand computer and battery is dead as his not keeping time. Re-place-the ladies, Ive no problems to open laptops. Thanks for your