Dynamic Column Formula based on Prompt

Hi,
i've defined a prompt and a presentation variable associated called "Scenario". It can assume values "Actual" or "Budget"
My Subject Area contains vary dimensions and a fact table called "Productivity Measures" with following fields: "Productivity Actual" - "Productivity Budget"
I've created a report with an only field (Header: 'Productivity") which retrieves data from my "Productivity Measures" fact table.
Now i want that if Scenario value is Actual, the column formula of my field is "Productivity Measures"."Productivity Actual", otherwhise if Scenario value is Budget, the column formula of my field change dinamically to "Productivity Measures"."Productivity Budget". Is it possible? How can i do?

Hi user,
Why cant you write a case statement on the column defined i.e. when you select actual you get what you want and viceversa
eg:- CASE '@{scenario}'
WHEN 'Actual' THEN 'Productivity Actual'
WHEN 'Budget' THEN 'Productivity Budget'
ELSE 'Productivity Actual'
END
In case of prompt_column you declared variable right,you can call it there or directly use column name.
Hope it helps you with this.
By,
KK
Edited by: Kranthi on Dec 16, 2010 11:21 PM

Similar Messages

  • Dynamic column selection based on login in BI Answers

    Hi
    I have a dimension with manager level 1 to 10, based on the user login, I want to display the table with the column (level 1 or level n) dynamically ( ex: if the user is in manager level n, display column level n with other data in the table). P.S. there are more than 10000+ users, so I can't customize each user.
    can you please let me know if this is possible and how to do it?
    Thanks a lot,

    You might use the indexcol function for this purpose.
    http://download.oracle.com/docs/cd/E12096_01/books/admintool/admintool_SQL15.html
    In the document, you have a hierarchy example.
    Success
    Nico

  • Column display based on Prompt value ( Urgent Please)

    Hi Gurus,
    I have requirement to create the prompt based on the column, if i selected perticular column heading then i have to see the data of that column otherwise not.
    Example.
    column names: call attended, call droped, call time, service
    Report columns
    Region, call attended, call droped, call time, service, Fiscal Month
    east 100 10 23 20% Jan
    west 230 5 24 30% Jan
    east 120 10 23 20% Feb
    west 200 5 24 30% Feb
    Client want to have a pivot table view and want to have the call attended, call droped, call time as values in the prompt
    example if i selected in the prompt Call attended then i should report display like this
    ______ Jan 2011 : Feb 2011
    Region
    East 100 120
    West 230 200
    I am kind a confused and i am looking on web i didnt get any info. Please help me
    Regards
    Ali

    Hi Gurus,
    I got my answer. I followed the content of the link and i am able to slove my issue. Thought to share with communite members.
    http://www.biconsultinggroup.com/obiee-tips-and-tricks/using-a-dashboard-prompt-as-a-column-selector-for-multiple-r.html
    Regards
    Ali

  • Dynamic column output based on selection.

    Hi all,
    I have certain qualification select-options upon the selection-screen.
    I have 5001 to 5012 range of qualificaitons.
    If user select only 5001 to 5003....
    I want only 3 columns ...or else if user wants to select 5008 to 5012  output should be have columns 5008 , 09,10,11...
    I am displaying output in
    mail format only
    concanate 'COL1' COL2' 'COL2' TO STRING SEPERATED BY C=>LB.
    loop at itab.
    CONCATE ITAB-1 itab-2 itab-3 to Xstring.
    endloop.
    Thanks and regards
    sas
    Edited by: saslove sap on Jul 7, 2010 5:36 AM

    Well I have harcoded the value  as below.I have no choice find .  Instead of using mutiple 'IF' conditions ANY other options are left:
      CONCATENATE
      'Personnel Number'    'Employee GUID'   'Last Name'   'First Name'   'Position Number'   'Position Title'   'Department Number'
      'Department Name'    'Employee Subgroup text'    'Employee Group text'   'SBU Head Personnel Number'   'SBU Head GUID'
      'SBU Head Name'   'Supervisor Personnel Number'   'Supervisor GUID'   'Supervisor Name'
      'Personnel Subarea text'
    'CF1-Director function'
    'CF2-Nonexecutive director function'
    'CF3-Chief Executive function'
    'CF8-Apportionment & oversight function'
    'CF10-Compliance oversight function'
    'CF11-Money laundering reporting function'
    'CF28-Systems & controls function'
    'CF29-Significant management function'
    'CF30-Customer function, Investment Advice'
    'CF30-Customer function, Investment Mgmt'
    'CF30-Customer function, Trading'
    'Admin - FSA T&C qualifying role'
        INTO S_OUTPUT-X SEPARATED BY C_TAB.
    IF C = 'X'.
    IF '50000001' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF1-Director function'  INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000002' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF2-Nonexecutive director function' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000003' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF3-Chief Executive function' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000004' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF8-Apportionment & oversight function' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000005' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF10-Compliance oversight function' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000006' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF11-Money laundering reporting function' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000007' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF28-Systems & controls function' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000008' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF29-Significant management function' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000009' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF30-Customer function, Investment Advice' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000010' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF30-Customer function, Investment Mgmt' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000011' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF30-Customer function, Trading' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000012' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'Admin - FSA T&C qualifying role' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    endif.
      APPEND S_OUTPUT.
      LOOP AT GIT_ITAB ASSIGNING <GFS_ITAB>.
        CLEAR S_OUTPUT.
        CONCATENATE
    <GFS_ITAB>-PERNR <GFS_ITAB>-EMPGUID <GFS_ITAB>-LNAME  <GFS_ITAB>-FNAME  <GFS_ITAB>-POSITION  <GFS_ITAB>-POSTITLE <GFS_ITAB>-DEPTNO <GFS_ITAB>-DEPTNAME  <GFS_ITAB>-EMPSUBTEXT <GFS_ITAB>-EMPGRPTEXT
    <GFS_ITAB>-SBUNO <GFS_ITAB>-SBUGUID <GFS_ITAB>-SBUNAME <GFS_ITAB>-SUPVNO <GFS_ITAB>-SUPVGUID <GFS_ITAB>-SUPVNAME <GFS_ITAB>-PSUBAREATEXT
       INTO S_OUTPUT-X SEPARATED BY C_TAB.
    IF C = 'X'.
    IF '50000001' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF1  INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000002' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF2 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000003' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF3 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000004' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF4 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000005' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF5 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000006' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF6 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000007' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF7 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000008' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF8 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000009' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF9 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000010' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF10 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000011' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF11 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000012' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF12 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    endif.
      <GFS_ITAB>-CF2  <GFS_ITAB>-CF3 <GFS_ITAB>-CF4   <GFS_ITAB>-CF5 <GFS_ITAB>-CF6
    <GFS_ITAB>-CF7  <GFS_ITAB>-CF8 <GFS_ITAB>-CF9 <GFS_ITAB>-CF10  <GFS_ITAB>-CF11  <GFS_ITAB>-CF12
    *concatenate s_output-x c_cr into s_output-x.
        APPEND S_OUTPUT.
      ENDLOOP.

  • Error while passing prompt value in Column Formula

    Hi All,
    I have created a dashboard and added a dashboard prompt on that with a presentation variable named "promptdyn" that is basically showing bank names.
    Now i want to calculate the market value based on this prompt selection, so i edited the column formula as
    "WM FACT Sec"."MARKET VALUE" * EVALUATE('getBankBaseCurrencyValue(%2)' As Double,@{promptdyn},"Industry Type".INSTRUMENT_CCY)
    But it is throwing this error:
    \nQSError: 10058] A general error has occurred.
    \nQSError: 22051] The argument number 1 is not referenced in this evaluate expression: getBankBaseCurrencyValue(%2). (HY000)
    SQL Issued: SELECT "Industry Type".INDUSTRY_NAME, "Industry Type".INDUSTRY_TYPE, "WM FACT Sec"."MARKET VALUE" * EVALUATE('getBankBaseCurrencyValue(%2)' As Double,0,"Industry Type".INSTRUMENT_CCY) FROM WMAdHocReportingBMMSec
    I don't know what is wrong here.Here i tried to pass the value of the prompt to the function.
    Basically I have created a function in the database with two parameter as "bank name " and "Currency" and calling it with the help of evaluate function.
    How could we store the prompt value and pass it to some other function?
    Pls help me as it is urgent for me to solve.
    Thanks

    He Solved.
    Just i missed out to write %1,%2 in the evaluate function.
    But one thing i need to know that how can we store the value that is selected in a prompt say in dashboard prompt so that it can be used in query. Because i need to select a value first from the prompt and based on that i need to manipulate the values of the other request of the dashboard.
    Please Reply.
    Thanks

  • Column hiding based on Dashboard Prompt value in OBIEE 10g

    Hi,
    Can you please let me know, whether there is any possibility of "hiding the column based on the value selected in the Dashboard Prompt".
    Your suggestions are highly appreciated.
    Thanks & Regards
    Siva

    Hi,
    Simple way to solve it.
    Steps
    1.) set presentation variable for each columns of your dashboard prompt
    2.) edit your analysis of table/pivot view ---> colums formate header in this place just keep it your presentation variable values like below
    E.x
    @{ccy}
    Then save it and then test out
    Some more reference:
    http://oraclebizint.wordpress.com/2008/01/25/oracle-bi-ee-101332-dynamic-column-headers-using-presentation-variables-sets-and-conditional-formatting
    http://total-bi.com/2011/03/obiee-dynamic-column-headings
    Thanks
    Deva
    Edited by: Devarasu on May 17, 2012 8:32 PM

  • How to call the column names into the prompt and display values dynamically

    Hi,
    i have a typical requirement where I have to call 3 columns into the AGE Prompt (I know we can use the Column Selector to call the columns) .Below is the Screen Shot.
    !http://i46.tinypic.com/2qjfukh.jpg!
    2nd Requirement)
    The three columns I have are order Date, Ship Date and Entry Date.
    Whenever I click on Orderdate from the Prompt, It should dynamically show its values in the report.
    and When I click on the Ship Date from the Prompt, it should display the corresponding values in the report.
    and so on with the Entry Date.
    Can anybody help me how to acheive this.
    Thanks a ton.

    Ok so then you can use a fake column prompt. Here's one quick approach (nicer and cleaner with LOV tables but I don't if you have any of those).
    - Create a fresh prompt using any column you want.
    - Open the column formula using the fx button and replace the formula with 'abc'.
    - Use "SqL Results" as the "Show" option.
    - SQL:
    select case when 1=0 the Markets.Region else 'Order Date' from Paint.Markets UNION ALL
    select case when 1=0 the Markets.Region else 'Ship Date' from Paint.Markets UNION ALL
    select case when 1=0 the Markets.Region else 'Entry Date' from Paint.Markets
    - Set Variable = Presentation Variable = @{vPresVarSelectedDate}{Order Date}
    - Label = Date
    Then in the request, you change the column formula for the date. I'm going to make it short and just assume you called your time dimension alias(es) like the lowest grain:
    "@{vPresVarSelectedDate}{Order Date}"."@{vPresVarSelectedDate}{Order Date}"
    Cheers,
    C.

  • Dynamically change column heading without Dashboard Prompt

    Hi All,
    My requirement is change the column heading dynamically in a report. I have achieved this through setting the presentation variable to the dashboard prompt.
    I have 5 columns in the dashboard prompt. Out of these 5 columns, I want to use only 1 column as dashboard prompt.
    But still I want to dynamically change the column heading of the other 4 columns based on the only 1 column selected in the dashboard prompt.
    Is there anyway to achieve this?

    You need to have some logic to change other 4 columns based on 1 selected column.. where you want put that logic?
    BTW: Check these
    http://total-bi.com/2011/03/obiee-dynamic-column-headings/
    http://rampradeeppakalapati.blogspot.com/2012/02/dynamically-change-column-names-in.html
    If helps mark or also update back if you are thru with this.

  • Dynamic column in dashboard prompt

    Hi all,
    I have to dispay 'TOP' & 'BOTTOM' dynamic value in the dropdown of dashboard prompt how to create a dynamic column value in dropdown of dashboard prompt?I m trying to create it by writing case in show sql result but not getting correctly according to TOP & Bottom selection i have to make a the changes in report

    Hi Sonal,
    SELECT CASE WHEN 1=0 THEN "D2 Market"."M01 Market" ELSE 'Top' END FROM "Sample Sales"
    union all
    SELECT CASE WHEN 1=0 THEN "D2 Market"."M01 Market" ELSE 'Bottom' END FROM "Sample Sales"
    something like this in dashboard prompt sql results
    http://img709.imageshack.us/img709/7893/prompt.jpg
    Later,refer this to get a selected report http://varanasisaichand.blogspot.com/2010/02/dashboards-as-prompts-in-obiee.html
    thanks,
    Saichand.v

  • Dispaly or Hide a column based on Prompt Value

    Hi All,
    How can I Display or Hide a Column based on Prompt Value selected?
    On my dashboard I have a Report/Request and a Dashboard Prompt.
    Dashboard Prompt has three values, say: *'A', 'B' and 'C'*.
    And my report/request has three columns named *'Field1', 'Field2'* and Field3'.
    What I am trying to achieve is that whenever user selects prompt values as *'A' or 'B'* all the three fields on my report named *'Field1', 'Field2' and Field3'* should be displayed, however whenever user selects prompt values as *'C'* only fields named *'Field1' and 'Field2'* should be displayed.
    Thanks,
    Deepak

    Hi Bhavna,
    I tried using View Selector, however I am not able to achieve the required functionality with that.
    I created a Request with 3 columns in it, then I switched to criteria and added another table to that. The new table automatically got the similar 3 columns used in the first report. Now when I tried to delete one of those columns from the new report, it also got deleted from the first report.
    All the views are dependent, changes made to one are reflected in other.
    Can't figure it out, where am I going wrong?
    Thanks,
    Deepak

  • Hide column based on prompt

    Hi Gurus,
    Can i hide column based on Prompt value?
    My requirement is
    I have report is showing Daily/Weekly/Monthly data based on prompt value ( Prompt selected values are Daily/Weekly/Monthly)
    If user select daily then report will display data every day. if user select Weekly then report will display Every week data ( Week start from Monday).
    I have one more columns as Day name to display day of the week for daily report. its working fine.
    but i want hide day name column when i run report for weekly.
    How can i hide column based on Prompt value. is it possible in OBIEE 10.3
    really appreciated for your help

    Here's simpler approach. Use column selectors.
    1) The first column in your column selector will be where you put your Daily/Weekly/Monthly choices.
    2) In the second column, put your Day column. Add another column, doesn't matter what. I'll explain later. In the caption for this column, put in something like "Select to Hide Day column."
    3) Click "OK" and put your column selector in your Compound Layout.
    4) Now, select the other column in place of the Day column.
    5) Now go to the criteria tab. The "second choice" column should now be there in place of the original first column. Dummy out this column and click on the "Hide" checkbox in the column properties. Change the name to "No column."
    6) Now go back to Results. The user now has two choices for the Day column, either the original column (the Day column) or the "No column" choice. When the "No column" choice is selected, the column disappears from the report. Users can make the selection whenever they choose Weekly as their choice.

  • Previous 4 months column need to be displayed based on prompt selection

    Hi,
    I have prompt named
    JAN
    FEB
    DEC
    and i have 12 columns from month1 to month 12(jan to dec)
    when i select august from prompt i need to display 4 month previous of august
    so my result should be
    apr,may,jun,jul and august
    if i select february then my result should be
    jan and feb
    basically i need to hide columns based on prompt selection
    can i know how to do this

    Hi
    I think you have to go for Data level Security in this case.
    You have to set that Session variable in the Group/User Permissions tab so that the Group members can see only those regions data only, even if they go for a
    search.
    Otherwise there is nothing to restrict the user in all the directions.
    You have to apply that filter on all the tables in that Subject area.
    Hope this will help you.
    Guys, Please correct me if I am wrong
    thanks
    Anand

  • How to do running aggr based on prompt value and how to or prompt?

    Hello guys
    I have some requirements that I have a report that has measures and Months and Date..
    1. I have to create dashboard prompts on months and dates in such way that users can select either that want to see monthly sales or daily sales.. So the two prompts should be "or" relationship that point to the same report. If user select month from month prompt, the report will return data at monthly level; if select day on day prompt, it should return data at day level..
    2. Doing running sum based on the dates selected from the prompts.
    If I select day prompt as between "Feb 12th 2009" and "March 1st 2009", the report should return sales data that is the sum of all sales between "Feb 12th 2009" and "March 1st 2009".. If user select month prompt as between "Nov 2008" and "Feb 2009", the report should show the sum of all the sales from "Nov 2008" and "Feb 2009".
    How would I achieve both scenarios?
    Any pointer will be greatly appreciated..

    Hi.
    Maybe you want to have dynamic group by in Answers report by choosing group by part from a dashboard prompt.
    So, assume this example in which you have only one dashboard prompt that shows Day or Month character data.
    Make dashboard prompt:
    edit column formula: 1
    control: drop-down list
    show:
    SELECT case when 1=2 then TIMES.CALENDAR_MONTH_DESC else *'Day'* end FROM "Normal model"
    union all
    SELECT case when 1=2 then TIMES.CALENDAR_MONTH_DESC else *'Month'* end FROM "Normal model"
    default to - specified value: Day
    set variable - presentation variable: pv_dyn_group_by
    label: Group by
    Now make report in Answers and we'll use dynamic column for group by depends on our presentation variable (Day or Month):
    /* column 1 */
    label:
    I don't know how to dynamicly change column label (Month or Day) so I put just label Dynamic group by.
    column formula:
    case when '@{pv_dyn_group_by}' ='Day'
    then EVALUATE('TO_CHAR(%1,%2)' as varchar(20), TIMES.TIME_ID, 'dd.mm.yyyy')
    else TIMES.CALENDAR_MONTH_DESC
    end
    /* column 2 */
    AMOUNT_SOLD
    /* column 3 */
    RSUM(AMOUNT_SOLD)
    Test:
    In both cases we get the same result of RSUM in the end. First we group by a TIMES.TIME_ID if we choose 'Day', second by a TIMES.CALENDAR_MONTH_DESC if we choose 'Month'.
    Is that you want to?
    So if you want to see month or day values to choose it (between part) you must make second prompt with something like this in show SQL results:
    SELECT case when '@{pv_dyn_group_by}{Month}'='Month' then TIMES.CALENDAR_MONTH_DESC end || case when '@{pv_dyn_group_by}{Day}'='Day' then EVALUATE('TO_CHAR(%1,%2)' as varchar(20), TIMES.TIME_ID, 'dd.mm.yyyy') end FROM "Normal model" order by 1
    The name of the second prompt is: '@{pv_filter}{Month}'
    That will display 'Month' or 'Day'. I don't know better solution :-)
    Similar is to make a between 2 prompts.
    After then you must modify filter in Answers to get OR (between dates ot between months)
    Regards,
    Goran Ocko
    http://108obiee.blogspot.com/

  • Dynamically Pass the Column Name cursor. || Dynamic Column Name

    Hi,
    I need to dynamically pass the column name based on a Mapping table in a loop ( Right now i have hardcoded stuff )just like using Execute immediate.... Inside the procedure, I have commented as where i hit the problem.
    Thanks for all of your time...
    Thanks
    Muthu
    CREATE OR REPLACE PROCEDURE xml_testing_clob AS
    doc xmldom.DOMDocument;
    main_node xmldom.DOMNode;
    root_node xmldom.DOMNode;
    user_node xmldom.DOMNode; item_node xmldom.DOMNode;
    root_elmt xmldom.DOMElement;
    item_elmt xmldom.DOMElement;
    item_text xmldom.DOMText;
    item_test xmldom.DOMText;
    nodelist xmldom.DOMNodeList;
    sub_variable varchar2(4000);
    x varchar2(200);
    y varchar2(200);
    sub_var varchar2(4000);
    CURSOR get_users IS
    SELECT FIRST_NAME,LAST_NAME,ROWNUM FROM USER_INFO_TBL WHERE WEIN_NUMBER = '1234' ;
    CURSOR get_cdisc_name IS
    select CTS_COL_NAME,CDISC_NAME from CTS2CDISC_DICTIONARY where CTS_TABLE_NAME = 'USER_INFO_TBL';
    BEGIN
    -- get document
    doc := xmldom.newDOMDocument;
    doc := xmldom.NewDomDocument;
    xmldom.setVersion(doc, '1.0');
    xmldom.setStandalone(doc, 'no');
    xmldom.setCharSet(doc, 'ISO-8859-1');
    -- create root element main_node := xmldom.makeNode(doc);
    root_elmt := xmldom.createElement(doc,'AdminData');
    root_node := xmldom.appendChild(main_node,xmldom.makeNode(root_elmt));
    FOR get_users_rec IN get_users LOOP
    item_elmt := xmldom.createElement(doc,'User');
    xmldom.setAttribute(item_elmt,'OID' , get_users_rec.rownum);
    user_node := xmldom.appendChild(root_node,xmldom.makeNode(item_elmt));
    FOR cv_get_cdisc_name IN get_cdisc_name LOOP
    EXIT WHEN get_cdisc_name%NOTFOUND;
    sub_var := cv_get_cdisc_name.cts_col_name;
    sub_variable := 'get_users_rec.';
    sub_variable := 'get_users_rec.'||cv_get_cdisc_name.cts_col_name;
    x := sub_variable;
    dbms_output.put_line(x); -------------- Here i just see the literal string
    y := get_users_rec.FIRST_NAME;
    dbms_output.put_line(y); -------------- Here i just see actual value ( data )
    item_elmt := xmldom.createElement(doc,cv_get_cdisc_name.cdisc_name);
    item_node := xmldom.appendChild(user_node,xmldom.makeNode(item_elmt));
    item_text := xmldom.createTextNode(doc,x ); ---- This is the place i am hitting with an error .
    If i use variable X then i am able to see only the literal
    string in the output. BUT if i put cursor name.coulmname,
    then the resumt (XML) is fine.I wanted acheive this
    dynamically just like execute Immediate
    item_node := xmldom.appendChild( item_node , xmldom.makeNode(item_text));
    END LOOP;
    END LOOP;
    -- write document to file using default character set from database
    xmldom.WRITETOCLOB(doc,);
    xmldom.writeToFile(doc, 'c:\ash\testing_out.xml');
    -- free resources
    xmldom.freeDocument(doc);
    END;
    +++++++++++++++++++++++++++++++++++ XML OUTPUT +++++++++++++++++++++++++++++++++++++++++
    <?xml version="1.0" ?>
    - <AdminData>
    - <User OID="1">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName> </User>
    - <User OID="2">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    - <User OID="3">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    - <User OID="4">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    - <User OID="5">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    ++++++++++++++++++++++++++++++++++++++++++++++++++++ MAPPING TABLE DETAILS +++++++++++++++++
    CTS_COL_NAME     CDISC_NAME     CTS_TABLE_NAME     XML_TAG     -----------> Column Name
    FIRST_NAME     FirstName     USER_INFO_TBL     Element     -----------> Records
    LAST_NAME     LastName     USER_INFO_TBL     Element     -----------> Records

    My scenario is little different, let me explain:
    My columns will remain same but values changes (based on column formula) according to the selected prompt value
    If I select 'Oct' from prompt then
    Curr will contain data for 'Oct' only
    Next1 will contain data for 'Nov' only
    Next2 will contain data for 'Dec' only
    Next3 will contain data for 'Jan' of next year only.
    Later if I select 'Jul' from prompt then
    Curr will contain data for 'Jul' only
    Next1 will contain data for 'Aug' only
    Next2 will contain data for 'Sep' only
    Next3 will contain data for 'Oct' only.
    I don't have different columns for each months but the columns are capable to reflect data for any month.
    So, how can I reflect the column name as month name for which that contains data.
    Regards,
    S Anand

  • Performance issue due to column formula and filters

    Hi,
    I am facing strange issue with performance for my OBIEE reports. I have two sets of reports Static and Dynamic. Both runs against same tables. The only difference between these reports is that the Static reports would run against all the data for given aggregation level e.g. Year, Month, Date and so on. Where as for Dynamic one I have range prompts to filter data. Other difference is that I have a column formula for one of the column in the Dynamic report, which is nothing but Go URL to show another page with certain parameters.
    The static report takes around 14-15 Seconds where as the Dynamic one takes around 3.5 min. The amount of data and range is same here. From the logs I could see that for the Static reports, i.e. reports without filters it applys group by at SQL level where as it is not doing so for the dynamic one. Is this expected ?
    Second issue is, even if I say remove the filters and just have report with column formula in one and no formula in other there is significant time difference in the processing at Presentation service layer. Again this is taken from the log. it takes 8 second to get data from DB but shows almost 218 Seconds as response time at Presentation layer.
    Below are conceptual details about table and reports -
    Table 1 (It is date dimension) : Date_Dim
    DateCode Date
    Day Number
    MonthCode Varchar2
    YearCode Varchar2
    Table 2 (It is aggregate table at year level) : Year_Aggr
    DateCode Date (FK to Table1 above)
    Measure1
    Measure2
    Measure3
    Measure4
    Measure5
    Report 1
    Date_Dim.YearCode | Year_Aggr.Measure1 | Year_Aggr.Measure2 | Year_Aggr.Measure3 | Year_Aggr.Measure4
    Report 2
    Dashboard Filter : Dimension1 | Dimension2 | Year Start | Year End |
    Date_Dim.YearCode | Year_Aggr.Measure1 | Year_Aggr.Measure2 | Year_Aggr.Measure3 | Year_Aggr.Measure4
    Column formula for Date_Dim.YearCode is something like :
    '<a href="saw.dll?Dashboard&PortalPath=somepath and parameters  target=_self>'  || Date Dim"."YearCode" || '</a">'
    Filters :
    Dimension1 is prompted...
    Dimension2 is prompted...
    cast("Date Dim"."YearCode" as Int) is greater than or equal to @{Start_Year}
    cast("Date Dim"."YearCode" as Int) is greater than or equal to @{End_Year}
    Note : I need to apply cast to int as column is varchar2, legacy problem.+
    How can I fix this? Am I missing something? In the result of report2 the DB SQL doesn't show the year in where thought it is displayed in the logical sql.
    Let me know if anybody had faced this and have fixed. Or suggetion to make changes to fix this.
    Thannks,
    Ritesh</a>

    Hi Ritesh,
    I think you right about the root cause of your problem. The first request does the group by in the database which returns fewer records to the BI Server for processing. The second request does not do the group by and sends significantly more records back to the BI server forcing it to do the group by. Compound that with the fact that pivot table views are relatively expensive computationally and that explains the difference between the execution times.
    Assuming that the execution time of the first report is satisfactory, I would recommend you try to experiment with a few settings to see if you can get the second report to do the group by in the database.
    Are the two filters identical except for the following conditions?
    cast("Date Dim"."YearCode" as Int) is greater than or equal to @{Start_Year}
    cast("Date Dim"."YearCode" as Int) is greater than or equal to @{End_Year}
    Best regards,
    -Joe

Maybe you are looking for

  • Pythagorean theorem

    Dear Colleagues I have recently managed to find the length of the hypotenuse given the lengths of the two opposing sides using sqrt. I have read that sqrt must be placed after Math because it is part of that class's family. Just so that I can practic

  • How to add a photo from a collection to a book in Lightroom 4.1?

    How to add a photo from a collection to a book in Lightroom 4.1?

  • IOS8 will not sync my iPad

    Since installing iOS8, I now find that when I try to sync with iTunes on my iMac, it seems to get stuck on stage 7 wight the caption "Waiting for changes to be applied" and that's it. IMac with OS10, iPad 4 with WiFi and 3gs iOS8

  • Problem with my data retrieval method

    I keep getting the following error message "SQLError:java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state" when I'm testing a method which executes a query on a database. The database has been setup and all that. I know becaus

  • P6 R8 Administer not available

    Has anyone else had the issue of the admin not having access to the administer functions and solved them? Txs in advance!!