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.

Similar Messages

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Query to add a column in between existing cols of a table?

    HI All,
    I have two questions.
    1. Query to add a column in between existing cols of a table? (not at the end. This is view of an order of output fields in a report)
    2. How do I swap the contents of two columns in a table. Suppose in a table tab there are 2 cols , col1,col2 populated with some data.
    I need a query(probably) to swap the col1 and col2 values . NOT AS A RESULT SET, BUT IT NEEDS TO GET CHANGED IN THE TABLE.
    Please help !

    > 1. Query to add a column in between existing cols of
    a table? (not at the end. This is view of an order of
    output fields in a report)
    Not really sensible ito DBMS - it does not care how you want to view the data. The sequence and formats of columns are what you/the application need to specify in the SQL's projection clause.
    Also keep in mind to achieve this, the DBMS will need to rewrite the entire table to fit this new column in-between existing columns. This is not the best of ideas.
    The projection of rows is dealt with SQL statements - not with the physical storage implementation.
    > 2. How do I swap the contents of two columns in a
    table. Suppose in a table tab there are 2 cols ,
    col1,col2 populated with some data.
    I need a query(probably) to swap the col1 and col2
    values . NOT AS A RESULT SET, BUT IT NEEDS TO GET
    CHANGED IN THE TABLE.
    This seems to work:
    SQL> create table foo_tab( c1 varchar2(10), c2 varchar2(10) );
    Table created.
    SQL> insert into foo_tab select TO_CHAR(rownum), TO_CHAR(object_id) from user_objects where rownum < 11;
    10 rows created.
    SQL> commit;
    Commit complete.
    SQL> select * from foo_tab;
    C1 C2
    1 55816
    2 55817
    3 55818
    4 55721
    5 105357
    6 105358
    7 105359
    8 105360
    9 105361
    10 60222
    10 rows selected.
    SQL> update foo_tab set c1=c2, c2=c1;
    10 rows updated.
    SQL> select * from foo_tab;
    C1 C2
    55816 1
    55817 2
    55818 3
    55721 4
    105357 5
    105358 6
    105359 7
    105360 8
    105361 9
    60222 10
    10 rows selected.
    SQL>

  • Help - column that would show col A or Col B val based on presentation var

    We are having difficulty in getting this to work.
    Here is what we have in the column formula:
    CASE WHEN @{variables.nabc}='Mgmt $' THEN SR_QUOTA_ACHIV_AGGR.MGMT_DOLLARS_MTD_AMT ELSE SR_QUOTA_ACHIV_AGGR.LGL_DOLLARS_MTD_AMT
    We get Syntax error.
    The variable is set in the prompt using a fake SQL
    SELECT CASE WHEN 1=0 THEN SR_QUOTA_ACHIV_AGGR.MGMT_DOLLARS_MTD_AMT ELSE 'MGMT $' END FROM ROAD_RUNNER UNION ALL SELECT CASE WHEN 1=0 THEN SR_QUOTA_ACHIV_AGGR.LGL_DOLLARS_MTD_AMT ELSE 'LGL $' END FROM RPT_TBL
    Any help will be greatly appreciated.

    tHEHi,
    Thanku for reply.
    I used the same approach what did u reply. But still i am facing the similar issue once i say ok to the query.
    It is showing the following error:-
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <,>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: {call NQSGetQueryColumnInfo('SELECT CASE WHEN ''MGMT $''=''MGMT $'' THEN SR_QUOTA_ACHIV_AGGR.MGMT_DOLLARS_MTD_AMT ELSE SR_QUOTA_ACHIV_AGGR.LGL_DOLLARS_MTD_AMT, GEO_DIM.AREA, GEO_DIM.AREA_DESC, ORDER_SPLIT.BOOKED_DT, ORDER_SPLIT.ORD_SHIP_TO_SITE_CITY, ORDER_SPLIT.ORD_SHIP_TO_SITE_NBR, ORDER_SPLIT.ORD_SOLD_TO_SITE_CITY, ORDER_SPLIT.ORD_SOLD_TO_SITE_NBR, SR_QUOTA_ACHIV_AGGR.PROD_LINE_CD, SR_QUOTA_ACHIV_AGGR.QUOTA_CREDIT_COUNTRY_KEY, SR_QUOTA_ACHIV_AGGR.SALES_ORG_ID FROM ROAD_RUNNER')}
    SQL Issued: SELECT CASE WHEN 'MGMT $'='MGMT $' THEN SR_QUOTA_ACHIV_AGGR.MGMT_DOLLARS_MTD_AMT ELSE SR_QUOTA_ACHIV_AGGR.LGL_DOLLARS_MTD_AMT, GEO_DIM.AREA, GEO_DIM.AREA_DESC, ORDER_SPLIT.BOOKED_DT, ORDER_SPLIT.ORD_SHIP_TO_SITE_CITY, ORDER_SPLIT.ORD_SHIP_TO_SITE_NBR, ORDER_SPLIT.ORD_SOLD_TO_SITE_CITY, ORDER_SPLIT.ORD_SOLD_TO_SITE_NBR, SR_QUOTA_ACHIV_AGGR.PROD_LINE_CD, SR_QUOTA_ACHIV_AGGR.QUOTA_CREDIT_COUNTRY_KEY, SR_QUOTA_ACHIV_AGGR.SALES_ORG_ID FROM ROAD_RUNNER
    Thanks

  • 11.1.2 FR Column formula not working for rows other than first

    Hi All,
    I've a FR Grid with following layout
    Columns: Budget, Forecast, Var(Var being a formula col with the formula COL[A]- COL)
    Rows: Children of Total_Cost_Centre, Children of Total_Projects, ACC.10101
    Suppress MISSING on for row
    When i run the report, the rows show the valid combinations having data but the VAR column shows value only for the first combination while for rest of the rows it shows 0.
    The row selection is in one row only, not separate rows so there is no specific setting that could create the difference in results.
    Any help would be greatly appreciated.
    Cheers,
    Abhishek

    Hi All,
    I've a FR Grid with following layout
    Columns: Budget, Forecast, Var(Var being a formula col with the formula COL[A]-COL)
    Rows: Children of Total_Cost_Centre, Children of Total_Projects, ACC.10101
    Suppress MISSING on for row
    When i run the report, the rows show the valid combinations having data but the VAR column shows value only for the first combination while for rest of the rows it shows 0.
    The row selection is in one row only, not separate rows so there is no specific setting that could create the difference in results.
    Any help would be greatly appreciated.
    Cheers,
    Abhishek

  • 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

  • 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.

  • 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

  • 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

  • Passing filter values from column formula in OBIEE 10g

    Hi,
    I am trying to pass filter value from the column LY Spend YTD columns where we have a filter option and passing the year filter 2013 as below.
    FILTER("Fact - Purchasing - Invoice"."LY Spend YTD" USING (Time."Year" = '2013'))
    My goal behind doing this is, we have a filter already present for the whole criteria on the year which is 2012.
    But specifically for this column i dont want to pass the year 2012 to it, Instead I want to pass 2013 to it. But I am not succeding the result is blank.
    Please suggest and let me know if further understanding is needed.

    Hi Srini
    Thanks for you reply.
    I cannot do that way because some measures are satisfying with year 2012 and displaying the data and other measure are satisfying with 2013.
    I am working on LY Spend YTD, LY spend YTD - 1, Spend YTD and Year ago spend.
    So thats the reason I have thought that way of passing the filter in column formula irrespective of criteria filter.
    Please suggest.

  • 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)

  • Using a select clause in the column formula in an Analysis

    Hi all,
    Is there a function or syntax that I can use to simulate a "SELECT" clause in the column formula of an Analysis? What I am trying to achieve is displaying a measure from a specific fact record into the current record. For example, if the current record displays "Region","position", and "salary", I would like to add an additional column called "compared to" in which I can display the "salary" measure from another specific fact record whose attributes I know.
    Is there a function/statement that I can use to achieve this?
    Thanks

    Hi,
    U can't do it in Edit formula column..it's possible below one
    Add SQL filter in that column then follow blow steps
    Convert this filter to SQL
    i.e : add more option to sql here u can write SQL query in that column
    Thanks
    Deva

  • Selecting Multiple Columns in Segment's Column Formula of BIEE Marketing

    Hi all,
    in BIEE 10.1.3.3.1 Marketing Tool we are having problems creating a segment.
    We need the possibility to create a segment filter that contains for example the sum of two different columns ( Num SMS 1 month ago + Num SMS 2 months ago > 100).
    In the "Edit Column Formula Window" the user would like to add the columns from the left panel (like it is suggested in the edit column formula) but this seems to not work, instead when a column is selected a new "Create/Edit Filter" window pops up, therefore the selected column is not inserted in the "Edit Column Formula". We have also tried selecting the "Columns" button but no columns appear ("None").
    We have a work around to this but we can only do it by editing the column formula and adding manually the 2nd column and this is not very user-friendly.
    Does anybody have any suggestions?
    Thank you in advance for your help

    Hi all,
    in BIEE 10.1.3.3.1 Marketing Tool we are having problems creating a segment.
    We need the possibility to create a segment filter that contains for example the sum of two different columns ( Num SMS 1 month ago + Num SMS 2 months ago > 100).
    In the "Edit Column Formula Window" the user would like to add the columns from the left panel (like it is suggested in the edit column formula) but this seems to not work, instead when a column is selected a new "Create/Edit Filter" window pops up, therefore the selected column is not inserted in the "Edit Column Formula". We have also tried selecting the "Columns" button but no columns appear ("None").
    We have a work around to this but we can only do it by editing the column formula and adding manually the 2nd column and this is not very user-friendly.
    Does anybody have any suggestions?
    Thank you in advance for your help

Maybe you are looking for

  • Creation of Credit memo Request using FM SD_SALESDOCUMENT_CREATE

    Hi Guys, I am using FM SD_SALESDOCUMENT_CREATE to create credit memo request from flat file. we are using variant configuration and characteristic values for material are not being populated. Rest of the sales document is created but characteristic v

  • Windows 8 on my Mac

    How would I go about running Windows 8 on my Macbook Pro? I know about a thing called boot camp, but I don't understand how it works.

  • Create new report in report painter

    Hi Can any body let me know the steps for creating new report in report painter. Thanks in advance Prasad

  • STPro as Logics sample editor.

    I like to use STPro as Logics sample editor in certain cases. However, one thing has me stumped. Does anyone know how to get STPro to show up the sample in beats, when I (launch external sample editor' in LogicPro? I have the preferences set to show

  • My ipod is not able to play any songs

    first he jumped the list, now he doesnt play any song...Updated and reset the ipod. thought maybe it was due to a song...but he couldnt play any song at all...can sb help me or tell me what to do?