Error in Column Formula

Hi All,
I have to change the market value to a specific base currency. But i need to take the values from the FX_Rate table where we are storing current forex rates.
I have edited the column formula of Market_value as:
CASE "Currency".INSTRUMENT_CCY
WHEN 'INR' THEN ("Currency".MARKET_VALUE*0.025471) ELSE "Currency".MARKET_VALUE END
Then it works.
But when i am trying to provide the formula that is retrieving the value from the Fx_Rate then it throws error.
I have written a formula like this:
CASE "Currency".INSTRUMENT_CCY WHEN 'INR' THEN ("Currency".MARKET_VALUE*(SELECT "FX_RATE".RATE FROM "FX_RATE" WHERE "FX_RATE".CCY='INR' AND "FX_RATE".CCY2='USD' ))
ELSE "Currency".MARKET_VALUE END
ERROR:
\nQSError: 10058] A general error has occurred. \nQSError: 27002] Near <SELECT>: Syntax error \nQSError: 26012] . (HY000)
SQL Issued: SELECT CASE "Currency".INSTRUMENT_CCY WHEN 'INR' THEN ("Currency".MARKET_VALUE*(SELECT "FX_RATE".RATE FROM "FX_RATE" WHERE "FX_RATE".CCY='INR' AND "FX_RATE".CCY2='USD' )) ELSE "Currency".MARKET_VALUE END, Currency.INSTRUMENT_CCY, Currency.INSTRUMENT_ID, Currency.INSTRUMENT_TYP, Currency.MARKET_VALUE FROM CurrencyPL
Pls help me solve this problem. How can we use select statement in the column formula?
Thanks

First option (OBIEE 10.1.3.3).
With EVALUATE funciton you can call user-defined functions directly from the database.
EVALUATE('MarketValueByBase(%1,%2)',Instrument_CCY, CCY2)
Check this thread by Venka:
http://oraclebizint.wordpress.com/2007/09/10/oracle-bi-ee-10133-support-for-native-database-functions-and-aggregates/
Another option (i think better !!!).
Add FX_RATE table to repository (physical and business model)

Similar Messages

  • Union of non-compatible types error in column formula in obiee

    Hi Experts,
    Error: Union of non-compatible types
    I used Case function in my column formula and got above error as a result.
    The column formula goes below:
    IFNULL(CASE WHEN EDM_TRD_IR_LEG.LEG_ID=1 THEN (EDM_TRD_IR_LEG.PAY_RECV_IND) ELSE 0 END, 0)
    LEGID is numeric type. PAY_RECV_IND is varchar type.
    Please let me know how to resolve this error.
    Thanks in Advance.
    -Regards
    Mayuri

    898221 wrote:
    Hi Experts,
    Error: Union of non-compatible types
    I used Case function in my column formula and got above error as a result.
    The column formula goes below:
    IFNULL(CASE WHEN EDM_TRD_IR_LEG.LEG_ID=1 THEN (EDM_TRD_IR_LEG.PAY_RECV_IND) ELSE 0 END, 0)
    LEGID is numeric type. PAY_RECV_IND is varchar type.
    Please let me know how to resolve this error.
    Thanks in Advance.
    -Regards
    Mayuri@dpka, you have syntax errors in your solution. If you're casting as varchar, then your syntax should read '1' instead of 1. Also at the end, it should be '0' instead of 0.
    Mayuri,
    To use your syntax, try this:
    IFNULL(CASE WHEN EDM_TRD_IR_LEG.LEG_ID=1 THEN CAST(EDM_TRD_IR_LEG.PAY_RECV_IND AS INTEGER) ELSE 0 END, 0)
    ...if you need the result as a numeric for aggregation purposes...

  • 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

  • Date variable in a column formula

    Hi
    I am having trouble using date-values from a Dashboard Prompt in a column formula in Answers.
    The situation:
    I use a dashboard prompt to select a date, the selected date stored in a presentation variable ('production_end'). In an answers request, I would like to use the 'selected_date' value to filter values for one column:
    FILTER("Measures new".Produced USING(Calender."Full Date" = @{production_end}{timestamp'2009-07-31 00:00:00'))
    Error after prompt execution:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <00>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: {call NQSGetQueryColumnInfo('SELECT FILTER("Measures new".Produced USING(Calender."Full Date" = 2010-07-14 00:00:00 FROM source_db')}
    SQL Issued: SELECT FILTER("Measures new".Produced USING(Calender."Full Date" = 2010-07-14 00:00:00 FROM source_db
    There is no problem using the production_end in a column filter to filter the whole request, the error only shows up whenever I try to use it in a column formula.
    Hope you can help.
    Thanks
    Regards
    Andy

    Hi Kart,
    I think I found the problem and the solution.
    I use a dashboard prompt with a default value based on a repository variable ('today'). The prompt feeds a presentation variable ('prod_end').
    In the answers request I use prod_end in the following column formula (I changed the request slightly compared to the ones we were discussing - the basic functionality of using the presentation variable is the same):
    MONTH(timestamp'@{prod_end}')
    That combination leads to the follow error when opening the dashboard for the first time:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000]
    [nQSError: 10058] A general error has occurred.
    [nQSError: 46047] Datetime value TIMESTAMP '2010-07-15 00:00:00' from TIMESTAMP '2010-07-15 00:00:00' does not match the specified format. (HY000)
    The first timestamp probably being the timestamp defined in my column formula, the second one (the one selecting from) probably being the repository variable definition.
    Solution:
    If I default the dashboard prompt using an sql statement to refer to the repository variable 'today' it works
    Default prompt to:
    SELECT Calender."Full Date" FROM OLS where Calender."Full Date" = VALUEOF("today")
    Thanks for your help
    Regards
    Andy

  • Can I use to_date() function in Answers Criteria Column Formula

    Hello.
    A simplified example of what I'd like to achieve in a column formula -
    year(to_date('1954-11-06', 'YYYY-MM-DD'))OBI tells me this is a syntax error.
    Alternatively, I tried this -
    year(cast('11/6/1954' as DATE))This gets past the syntax check, but results in "unhandled user-defined exception ORA-06512".
    Any suggestions appreciated.
    Thank you.
    -cs

    Here it is -
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 6510, message: ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "APPS.APP_SESSION", line 313 at OCI call OCIStmtExecute: call /* 191215240 */ APP_SESSION.validate_icx_session('ScAGT-sNOLfHYfB6RveHGAiw:S') . [nQSError: 17011] SQL statement execution failed. (HY000)
    SQL Issued: SELECT "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Number saw_0, "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Item_Description saw_1, "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Order_Creation_Date saw_2, "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Order_Closed_Date saw_3, year(cast('11/6/1954' as DATE)) saw_4, case when (MONTH("- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Order_Creation_Date) < 8) and (MONTH("- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Order_Closed_Date) > 8) then 1 else 0 end saw_5 FROM "[Noetix-NoetixGlobalRepository] NoetixViews for Oracle Service" WHERE "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Number IN ('319317', '325405') ORDER BY saw_0, saw_1, saw_2, saw_3, saw_4, saw_5

  • Error in Dimension formula to find the average price

    Hi all,
    I have tried a dimension formula to find the average price of Product.
    if the product is a parent level member then average price should be the average of the list price,other wise it should be the list price itself.
    IIF([PRODUCT].CURRENTMEMBER.PROPERTIES("CALC")="N",[KEYFIGURES].[LISTPRICE],AVG(DESCENDANTS([PRODUCT].CURRENTMEMBER,[KEYFIGURES].[LISTPRICE],LEAVES)))
    While i tried the same i received some strange error , i don know whether its having some dependency on the Customer dimension. since K0030101 is a memebr belonging to CUSTOMER dimension.
    MDX statement error:"Value K0030101 for characteristic /CPMB/U6D7SXT un"
    I'm not sure whether its an error with  the formula i created or any dependancy issue or whether this scenario is possible  using  dimension formulas or not.
    Thanks in advance .
    Anila Mohan

    Hi everyone!
    We are using BPC 7.5 NW SP08 and we've had the same error message while adding a formula to the Account dimension:
    'MDX statement error: "Value 1 for characteristic /CPMB/S9D7Q23 un".
    We then checked in BW for /CPMB/S9D7Q23 and found out that it was the Product dimension.
    The solution for the issue was quite interesting. I had seen in another post that sometimes CALC property was not correctly determined for SP08. The solution proposed was to edit dimension members, clear ParentH1 column, process dimension, re-edit, paste back ParentH1 values and process dimension again. This corrected CALC property problem.
    It also worked for my case. After doing it to Product dimension I tried again to set the formula in Account dimension and it worked!!
    Hope this helps.
    Regards,
    Luigi Laporte

  • Lookup column in calculated column formula

    I have a Lookup column(Discountfirst) which has Number.
    I also have another Calculated column(Finaldate) with Resulttype DateTime.
    One more column(DateofReceipt) in Date.
    My Calculated column formula looks like this
    =(DateofReceipt)+(Discountfirst).
    I get an error
    "One or more column references are not allowed, because the columns are defined as a data type that is not supported in formulas".
    I googled and came to know I can't use Lookup Column in Calculated field.
    Any suggestion how can do this ?

    This can't be done using calculated columns because calculated columns can only be used for columns on the same list.
    Using SharePoint Designer Workflows you can just use Create List Item and Update List Item actions so that whenever a user adds a value the item will be added in another list's column which contains the previous amounts already.
    http://stackoverflow.com/questions/16295567/how-to-create-calculated-column-with-data-from-another-list
    https://social.msdn.microsoft.com/forums/sharepoint/en-US/01989169-eac7-4f28-809d-6e5af400fb03/lookup-column-to-calculated-field-showing-string-at-beginning
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • FR--Column Formula( col[a]-col[b])

    Dear gurus,
    Please help on this I am struggling from many days for simple formula
    I am working on 11.1.1.2
    IN FR
    I have 2 data columns , for some accounts there is no data
    when I am doing subtraction of 2 columns its showing "#Error"
    I am replacing In suppression options no data as "-"
    Accounts:::::: COLA ::::::COLB::::::COL C
    100::::::::::::: - ::::::::: - :::::::: #error
    In column C
    I am doing Col[A]-COLB] its a formula column
    Please your help would be appriciated.
    Thanks
    Edited by: 988844 on Feb 19, 2013 1:34 AM

    Hello Rajesh,
    Really You done great job
    Its wroking excellent.
    Really very very very much Thanks
    If you dont mind may i have your mail ID for any communication
    Thanks again its very very help ful.

  • Report error: ORA-20001: Error fetching column value

    Hi,
    I try to build a tabular form with 1 column as "Select List (Query based on LOV)". This select list should display round about 1.100 rows in the LOV ordered by name. So I got the error: report error:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numerischer oder Wertefehler: character string buffer too small
    When I try tho define this column as Popup LOV (Query based LOV) only the the ID of the attribute and not the display value appeares in the row. The LOV it self displays the display number and not the the ID. I want to see the display value in the column of the particular row and the LOV and return the ID to the record by insert or update as it is normal in LOVs of form regions.
    This lot of rows in the LOV is necessary because it is a part to develop formulas like (number_of_acquisitions - number_of_old_parts)/100 or so. The most formulas will be more complex. In the database there should only be the ID as reference to the attributes.
    Please help me to display the attribute bases on LOV in every particular row.
    Thank you
    Siegwin

    In Apex 4 there is now a column type "Popup Key LOV (named LOV)" which is exactly what you are looking for.
    Edited by: 964978 on Oct 12, 2012 4:53 AM

  • Column formulas?

    Has there been a change to the way column formulas work in 09? I did a trial of iWork 08 a while back, and while I was very impressed, there were a few critical features missing. Some of those have been addressed in 09, so I am doing another trial. I loaded up one of the sample spreadsheets I created in 08 and I am trying to modify a column formula to use some of the new functions, but I keep getting an error about "[column name] is not a valid argument for '-' operator" (or something to that effect), and the error only appears in the header row (the remaining columns retain their original formula).
    Am I missing something? I can't find much info about column formulas in the help. (And has the ability to edit them been improved at all? Having to re-enter it from scratch in the header, and then retype the text for the header is hardly user-friendly.)
    Thanks
    Colin
    Message was edited by: Colin Young

    Edit the header formula was not a problem.
    I built it in row 2 then, when it was OK,
    I copied the content of the Formula Bar
    selected the header cell
    put the cursor in the Formula Bar and pasted.
    Often I also pasted the formula in a WP document
    which was often useful to change the parameter separator before posting here.
    I already posted a request to Bug Hunters:
    +Your tracking number for this issue is Bug ID# 6484016. You may check status on this report via the 'My Originated Problems' tab. When contacting us by email, please be sure to reference your Bug ID number.+
    Hello
    +I am testing Numbers v2.+
    +The multi header rows feature is fine but, was it really necessary to drop the "Applying a Formula Once to Cells in a Column or Row" function which was very useful ?+
    +It gives the ability to have perfect auto-filling cells when we insert new rows.+
    +I hope that you will be able to revive it soon.+
    Just Wait and See.
    Yvan KOENIG (from FRANCE samedi 10 janvier 2009 16:26:41)

  • Check for null in column formula

    I have a quiz report in OBIEE BI, and I only want to show quizzes where the end date is not null.
    Is there a way to do that within the column formulas?
    Thanks

    Column filter select is not null

  • 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

  • Filter Function in Column Formula is not working properly

    Hi,
    I am using Filter Function in Column formula tab in Answers to calculate the Total sum from the start of the Fiscal month to the Month selected from the Prompt.
    My requirement is I have total sales column. Now I need to calculate TYYTD kind of thing for which I cant use the Time sereis due to my report constraint.
    Instead of that I am using this Filter function on TYYTD column where i am giving the filter as start of the Fiscal month to the month selected from the Prompt.
    For example if I select May month from the Prompt then this TYYTD column should give me SUM(Total Sales) between Feb and May for which I am using the Filter Function. But it giving me only May sales whcih is same as Total Sales column.
    Can anyone throw some light on this as this is very important for us or any alternate solution other than Time sereis measures.
    Did anyone got this kind of issue with Filter Function?
    Regards,
    Azad

    Ok...here's the steps to fix this as efficiently as possible.  I have a whole bunch of mailboxes under "On My Mac" and they have a bunch of mailboxes nested in them.  I get my messages into Apple Mail via IMAP.  (I don't know if this matters.)  The steps below assume you have a similar setup.
    1.  Hold the Option key down and click the dropdown arrow next to each mailbox that has one.  This will cause all nested mailboxes below it to appear.
    2.  Go to the top of the list of mailboxes under "On My Mac" and highlight the first mailbox.  Then hold the Shift key down and highlight the last mailbox in the list.  This will cause all of the mailboxes and nested mailboxes to be highlighted.
    3.  From the menu, select "Mailbox --> Rebuild" and the rebuild process will start.
    4.  Watch the top of the mail screen to see the message count change as the mailboxes are being rebuilt.  Wait until the activity stops before doing the next step.
    5.  As the mailboxes were rebuilt, many messages were reset as "Unread" even though every message was previously "Read."  Make sure the mailboxes you want to affect are still highlighted.  Right-click and select "Mark All Messages Read."
    That fixed the problem for me.

  • SSRS query shows error no columns

    this is the query command Text:
    ="select pallet_id, pallet_create_dm,pn_id from MATS_ITG.pwax_pen_link where pallet_id  in ("& Join(Parameters!pallet_id.Value,",") &")"
    when it querys it shows error
    An error has occurred during report processing. (rsProcessingAborted)
    Query execution failed for dataset 'DsPartial_lookup'. (rsErrorExecutingCommand)
    ERROR [42703] ERROR 2624: Column "SGAC2207H0" does not exist 
     pallet_id is a multiple value  ,SGAC2207H0 is just my data
    can not figure out why, Please help me

    Hi ,
      Pallet_ID parameter seems to passing string like 'SGAC2207H0' . Check and change the parameter to pass numbers by checking the assignment to the value column in the parameter. If still need the string to be passed , Try the below expression  
    ="select pallet_id, pallet_create_dm,pn_id from MATS_ITG.pwax_pen_link where pallet_id in ('"& Join(Parameters!pallet_id.Value,"','") &"')"
    Best Regards Sorna

  • Presentation variable in column formula issue

    Hi,
    I'm having an issue about putting a presentation variable in a column formula. I'm using obiee 11.1.1.7.141014
    I'm adding a text in a formula column where I use two presentation variables: pPeriodo and pAno
    pPeriodo invoques the month selected in a prompt and pAno the year. I have to compare different years, so in one member I use @{pAno} when is the selected year and @{pAno-1} when is the prior year.
    The result of this (please see the header of the 2nd column):
    The problem is when Icompare to next years. So my issue happens when I do an addition to the presentation variable: @{pAno+1}
    It doesn't do the sum; it concatenates the value as you can see in the following images
    If anyone have a workaround about this, please share.
    Regards,
    Miguel

    Hi Joven
    Try @{pAno}+1 instead of @{pAno+1}
    Regards
    Rajagopal

Maybe you are looking for

  • ITunes/Quicktime Problem

    I'll start by saying my problem is similar to this one: http://discussions.apple.com/thread.jspa?threadID=498798 with a few differences. I'm running Windows XP Pro. After updating to the lastest version of iTunes, I can no longer open it. Whenever I

  • Unable to find the Transfer Rules in Transport Connection

    Hi Guys, I am on BW 3.5. I am unable to find the Transfer Rules created in transport Connection. I need to Transport these changes. I was able to Transport Communication structure and the Infosource. I tried activating the Transfer Rules and also rep

  • Ethernet connected, no internet?

    2009 27" iMac running 10.8.5, standard specs, new hard drive. I moved a few months ago and started using Ethernet instead of WiFi. When my ISP installed the cable I had issues connecting from the get-go -- network prefs show a stable Ethernet connect

  • Oracle RAC Issue

    I have installed Oracle RAC on VM Ware . I am facing problem during database connection after shutting down any node . It takes 7-8 minutes for making new connection after any node down. Please find below crs_stat -t output Name Type Target State Hos

  • Another user-modified table 'Product Tree' (OITT) - Error message

    Hi Our B1 2005A SP01 PL48 sometimes shows the following error message when trying to change a BOM, even if this error is not possible. Another user-modified table 'Product Tree' (OITT) (ODBC -2039) [Message 131-183] What can I do, except for deleting