Problem with calculated column, everything inc. NULLs appear

Good morning,
This one is tough.
I have a dimension Category (with categories: Fruits, Vegies, Canned, etc.). And in my fact table I have field Expense. Then I decided to create calculated fields like "Fruits Expense" -
CASE WHEN Dim."Category" = 'Fruits' THEN Fact.Expenses "."Expenses $ CY" END
There're 2 problems:
A) if the field Category isn't dropped in Answers there're many NULLS (all Exp values which don't belong to 'Fruits')
B) If Category isn't there, there're even more NULLs - which don't look good at all - there're too many empty values
Of course, it's possible to train users to use filters (is not null), etc. - but then it's really not what OBIEE is good at.
Can someone suggest a better approach?
I proposed in the beggining to create fields in the DB like "Expense Fruits" - but ut was deemed too complicated on ETL side.
Thank you and have a wonderful OBIEE day
UPD: OK, I want to rephrase it and make it easier. Except for using "is not null" filter- is there any other way to supress NULL values? I'm getting 12 empty ones and 1 i need. Is there anything I could do in order to supress showing NULL values by default. Thanks
Message was edited by:
wildmight
Message was edited by:
wildmight

Thank you Nilanshu! Where have you been! I'm already seeing quite a few useful contributions. I'll try to go ahead and test your suggestions and I'll report what I've found.
P.S> It works like a charm. Thank you
Message was edited by:
wildmight

Similar Messages

  • Problem with calculating column total

    Hi All,
    I am using Oracle Jdeveloper 11g Release 2.
    I want to show the sum of salary in application. I have the following step to do this.
    *1.*
    I have written the following code in EmployeesViewImpl.java class:
    public Number getSalarySubtotal() {
    if (salarySubtotal == null) {
    salarySubtotal = new Number(0);
    RowSetIterator rsi = this.createRowSetIterator(null);
    while (rsi.hasNext()) {
    Row r = rsi.next();
    Number salaryTotal = (Number)r.getAttribute("Salary");
    if (salaryTotal != null) {
    salarySubtotal = salarySubtotal.add(salaryTotal);
    rsi.closeRowSetIterator();
    return salarySubtotal;
    *2.*
    I have also exposed this method as client interface on view object.
    *3.*
    I have also create a method binding on the page where I want on consume this method.
    *4.*
    The output text has the following expression: #{bindings.getSalarySubtotal.inputValue}.
    When I run the page, it is showing nothing.
    I don't know what is wrong with this approach.
    Any help will be highly appreciated.
    Thanks in advance
    Regards
    Bilal

    Are you trying to calculate the total salaries of employees? If that is the case you need this method at the Dept level.
    Have a look at this video:
    http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/ADF_Insider_Essentials/ImplementingTotals/ImplementingTotals.html?utm_source=dlvr.it&utm_medium=twitter

  • OBIEE 11G - problem with calculating percentage

    Hi,
    I have a problem with calculating a percentage....
    I have a 2 measures Success and Failure
    where Success is a count(Response_key)
    Failure is a count(failure_key)
    I want Success/(Success+Failure) * 100
    I am getting this value as a 0
    Infact any column I take from the subject area and say count of that column and divide it by any integer say count(column1)/5 ,Say count of that column1 is 132 Eg: 132/5 , Its showing this value as 26.00 when I put decimal value to 2 , but it is 26.4...It is avoiding decimal values .
    So in my case success/(success+failure) in which Dr is greater than Nr . Since we get the value as 0.something . It is showing 0 value
    So , 0*100 it is showing me as 0%
    Can anyone please help me on this ??
    --Siri                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Yes, you need to put cast in numerator alone to get the resultant output in double.
    You can mark the post as Correct since your issue is resolved now.
    Thanks

  • Problem with checkbox column in matrix

    Hello.
    I have a little problem with checkbox column in matrix.
    Column is binded to the UserData.
    It has ValOn="Y", ValOff="N".
    I use C++. It is wird problem. In matrix I have 10 columns - scrollbar role and if You want see checkbox column, You must role to the right. If this column is on the screen, and I use:
    checkcell->PutChecked(VARIANT_TRUE);
    then the checkbox is cheched, and if the checkbox isn`t on the screen and I use this comment - it nothing happening.
    I tried to use ValOn="Y", PutChecked...
    The problem i solved if the column is on the screen - if the column is first in matrix or second, but if it`s last I have a big problem.
    My column with checkbox is not editable, but I tried to make it editable, check it, and then make it uneditable - the same efect.
    How can I solve it ?
    Sorry for my english.
    Kamil Wydra

    Hello Kamil,
    I am not sure about your problem, but here is an example of how to use checkbox in UI API.
    First, create the matrix with checkbox column in Screen painter, and the output is an xml file, like this. Type as 121 indicates that it is a check box.
    - <column AffectsFormMode="0" backcolor="-1" description="" disp_desc="0" editable="0" right_just="0" title="Rented" type="121" uid="Rented" val_off="N" val_on="Y" visible="1" width="41">
      <databind alias="U_RENTED" databound="1" table="@VIDS" />
      <ExtendedObject />
    Second, bind the column to table from DB. This is a bug of 2004 Screen Painter, so if you are using 2005 Screen Painter, there is no problem.
    Third, when you open the form, you can check and uncheck the cell.
    BTW, please set the editable of the column to true.
    Hope this helps,
    Nick

  • WebRowSet Problem  with database columns defined as TEXT??

    Hello,
    Can somebody help me on this subject. (http://forum.java.sun.com/thread.jspa?forumID=31&threadID=778586)
    I have the same problem with TEXT column when I try to populate the WebRowset.
    Thanks,
    Stephane

    OK,
    I change my postgresql driver for the lastest version (postgresql-8.2-506.jdbc3.jar) for JVM 1.5 and it's find...
    This driver support the javax.sql.
    St�phane
    Edited by: Borealis on Oct 15, 2007 12:43 PM

  • I have a problem with my e mail.  It appears stuck.  I cannot do anything with it.  Any suggestions

    I am having a problem with my e mail.  It appears stuck.  Every other app works but my mail?  Can anyone help

    Tap your home button to get to your home page.  Then double tap your home button to open the Task Bar (most recently used apps).  Hold your finger on your mail app until all the apps on the task bar jiggle.  You'll see an on the uppre left side.  Touch the to fully close your mail app (closing all recently used apps on a regular basis is actually a good idea).  Tap your home button to close the task bar.
    Now, reboot your iPad.  Press and hold BOTH the power and home buttons at ths SAME time for at least 10 seconds (ignore the red slider to shut down) until the Apple Logo appears, then let go of both buttons and your iPad will come back up. 
    Once it comes back up, you should be good to go.
    ETA:  Looks like my friend Demo and I are in full agreement on the solution.

  • Problem with shared column mapping

    I have a problem with mapping different fields onto the same column. In most cases Kodo handles it very well but one tough case it does not
    Modification references contract N-1 using contract_id field
    Contract back references two modifications out of all modification owned by THIS contract (last_modification and executed_modifcation)
    when both modifications are not null it works fine since I make sure both fields point to modification owned by the same contract
    hovewer when I set one of the fields (executed_modifcation) to null (after it was not null) Kodo attempts to set not only executed_modifcation field to null but contract_id as well. Which obviously not desired
    I understand that it is a pretty hard corner case. Do you think you can handle it or it is a dead end?
    Attached are my files

    Abe,
    I fully agree with your analysis. In my case we can use precedence of direct
    mappings over reference mapping in null situation.
    However as you noted, there are cases when we have only references and so
    you can not say which mapping is more important. However since we are
    resolving NULL issue here, I am not sure we need to know precedence of
    references - not null case should always take precedence. In other words:
    priority 1: direct mapping
    priority 2: not null reference
    priority 3: null reference
    Of course all three cases are subject rule of not changing value of shared
    column
    "Abe White" <[email protected]> wrote in message
    news:[email protected]...
    I admit that I didn't go through all your metadata, but I do believe that
    3.0 final will handle this case. My plan is to implement updates such
    that direct field mappings always take precedence over foreign key
    mappings.
    Let's say column CONTRACT_ID is used by int field contractId and is
    also used by field lastModification as part of an FK to a Modification
    instance (which I believe is close to your mapping). Because contractId
    is a simple field rather than a foreign key, Kodo will give it the final
    say on nulling/defaulting the CONTRACT_ID column. So if you null the
    lasetModification field, CONTRACT_ID will retain the value of the
    contractId field. Any non-null value of the lastModification field will
    stilly have to jive with the contractId field, though, or else we'll
    throw an exception like we do currently when you try to set 1 column to
    multiple values.
    I believe this solves the common case of shared
    columns between direct mappings and FK mappings. There are other cases
    in which multiple FK mappings overlap on certain columns, and this does
    not solve nulling problems in those instances. However, I think those
    cases are very rare and not worth the effort. Correct me if I'm wrong
    and your situation actually is one of sharing columns between multiple
    FKs and no primitives after all.

  • Problem with last column in footer - 11G

    Hello,
    I have a problem with displaying sum in footer for af:table .
    The footer connected to attributeValues which defined in the pageDef.
    I have 3 columns in the footer, the two first are shown fine, but last one is empty , althouh they are defined the same way.
    Replacing the order of columns did not resolve the problem, because still the last column is not shown.
    Any help will be appriciated.
    pageDef:
    <attributeValues id="BalancesDetailsViewSumCountUsed"
    IterBinding="InitBvBalancesDetailsViewIterator">
    <AttrNames>
    <Item Value="SumCountUsed"/>
    </AttrNames>
    </attributeValues>
    <attributeValues id="BalancesDetailsViewSumDifference" IterBinding="InitBvBalancesDetailsViewIterator">
    <AttrNames>
    <Item Value="SumDifference"/>
    </AttrNames>
    </attributeValues>
    Jspx:
    column c2 is fine , but c3 is empty
    <af:column sortProperty="CountUsed" sortable="false" id="*c2*"
    headerText="#{res['balances.countUsed']}" width="80px">
    <af:outputText value="#{row.CountUsed}">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.BalancesAMBalancesDetailsView.formats.CountUsed}"/>
    </af:outputText>
    <f:facet name="footer">
    <af:outputText value="#{bindings.BalancesDetailsViewSumCountUsed.inputValue}">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.BalancesDetailsViewSumCountUsed.format}"/>
    </af:outputText>
    </f:facet>
    </af:column>
    <af:column sortProperty="Difference" sortable="false" id="*c3*"
    headerText="#{res['balances.difference']}" width="80px">
    <af:outputText value="#{row.Difference}">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.BalancesAMBalancesDetailsView.formats.Difference}"/>
    </af:outputText>
    *<f:facet name="footer">*
    *<af:outputText value="#{bindings. BalancesDetailsViewSumDifference.inputValue}">*
    *<f:convertNumber groupingUsed="false"*
    *pattern="#{bindings. BalancesDetailsViewSumDifference.format}"/> </af:outputText>*
    *</f:facet>*
    </af:column>
    Thanks!

    Thanks you all!
    I found the problem. The iterator which sum the coulmn was at the last after the second sum, so it return null.
    So I replaced the hasNext() function with getAllRowsInRange() and now it is OK.

  • Problem with missing column text - PDF to Word conversion

    I just bought Acrobat Standard X and have a serious deadline to meet.  Problem is I converted a PDF with newspaper style columns to Word XP (2003) version and the first column of two will not budge with the right hand margin.  The text is there when prompted but some of the endings to words are being hidden.  I have tried putting an 'equal column width' command and it still doesn't work.  I have selected individual paragraphs to try and stretch out the margin to justify with the previous page alignment (which appears ideal) and it still will not do as I want.  On the ruler line, there is a blue gap between the columns and I can't get rid of it.  So, the first column insists on staying narrower than it should be and if I stretch it out to align with the other pages, it loses words I have typed until it reverts back to its original width.  Any ideas would be most welcome. This is a right pain in the butt. Thanks.

    Alas your expectation is not reflective of what the application is capable of.
    Acrobat's OCR has no concept of "styles". Nor does OCR provide Tagged content. As Acrobat's OCR does not incorporate a "zone" approach to character recognition the manual tagging of OCR output is non-trivial (and yes you'd have to do it manually).
    Having the PDF content exported to Word you'll more quickly arrive at your "destination" by manual application of the desired core Word headings / styles. Now if *all* paper documents were the same type layout / format / etc it might be possible for a Word developer to script something to apply headings / styles programmatically.
    Be well....

  • Help with calculated column formula- combine strings and convert to date

    In my list (SharePoint Server 2013) I have:
    'Invoiced Month' column, type of choice (strings with names of months- January, February, March..., December)
    'Year' column, single line of text (e.g. 2012, 2013, 2014)
    1. I need to create a calculated column which will return combined value of the columns above, but in DATE format e.g. 'Sep-2013' or '01-Sep-2013'.
    I then use that newly created calculated column to do this: http://iwillsharemypoint.blogspot.in/2012/03/sharepoint-list-view-of-current-month.html
    I am rubbish with formulas, can I have some help with my problem please?

    Hi,
    Use the formula, I have tested by creating Months column with choice, Year column as numeric and Calculated column as DateTime returned.
    =DATE(Year,IF([Months]="January", 1,IF([Months]="February",2,IF([Months]="March",3,IF([Months]="April",4,IF([Months]="May",5,IF([Months]="June",6,IF([Months]="July",7,IF([Months]="August",8,IF([Months]="September",9,IF([Months]="October",10,IF([Months]="November",11,12))))))))))),1)
    Before applying the formula few things need to be noted.
    DATE(YEAR, MONTH,DAY) will accepts three parameters all should be type numeric(integer).
    Create the Year column of type numeric
    Create the calculated column of type "DateTime" to return as date
    Please mark it answered, if your problem resolved or helpful.

  • Problems with varchar2 column and a select statement

    Hi to all,
    I am new to ODP...so I would really appreciate your help..
    I am having problems with using the following code:
    con.ConnectionString = "User Id=bla;Password=bla;Data Source=bla;";
    string cmdQuery = "SELECT * from try where data ="+textBox1.Text+"";
    OracleCommand cmd = new OracleCommand(cmdQuery);
    cmd.Connection = con;
    cmd.CommandType = CommandType.Text;
    OracleDataReader reader = cmd.ExecuteReader();
    while (reader.Read())
    MessageBox.Show(reader.GetString(0)+"");
    cmd.Dispose();
    con.Close();
    where:
    data is the name of a field in the table
    textBox1 is the name of a text box where the user inserts the values..
    The error that appears is "Invalid identifier"..
    I hope it makes sense...and please help...

    Hi,
    I'm fairly sure it IS the single quotes actually. Print out the string you're trying to excute, then try it outside odp.net, does it work?
    For example:
    SQL> select * from dual where dummy=foo;
    select * from dual where dummy=foo
    ERROR at line 1:
    ORA-00904: "FOO": invalid identifier
    SQL> select * from dual where dummy='foo';
    no rows selected
    Cheers,
    Greg

  • Problem with Stacked Columns in Business Graphics

    Hi,
    Has anyone used the stacked columns chart type in business graphics?  Am facing a problem with this.
    I am using the SimpleGraphics example demo with 2 dataseries, the values ranging from 0-10.  It works fine if the chart type is Columns (this is default).  When I change the chart type to stacked_columns, the graph goes for a toss.  The y-axis range automatically changes to 0-1 (values as 0, 0.2, 0.4 ... 1.0) and it does not display stacked columns as expected.
    Is there any specific property(s) that need to be set for this chart type?
    Appreciate any quick response.
    cheers,
    Vittal

    Hi friend,
    See the link below it is having the solution of hiding the columns in smart forms
    Hide table columns in smart form?
    Create a table to display your values with 12 col and hide the columns based on the idea provided in the link above.
    I think this will solve your issue if you still have queries please revert back to me i will help you.
    Thanks,
    Sri Hari

  • Problem with dynamic column in SBWP

    Hi Friends,
    In SWL1 I have created two attributes with header as "CANCELLED" and " DESCRIPTION" for a particular task.But my SBWP is still showing columns as "Dynamic column" for the workitems of that task.
    Please help me on this.
    Thanks.
    Dilip

    Hi Dilip,
    The column headings will only appear in the task-specific view. In other words, by default the headers will be generic because you can have mixed tasks in the worklist, and column 1 can be a date for one task and a company name for another.
    The user needs to expand the tree on the left hand side and navigate to the "Approve Purchase Order" (or whatever) node to show only items of that task, then column headers should show up.
    Regards,
    Mike

  • Problem with dynamic columns in smartforms.

    Dear SDN Experts,
    I have a requirement in smartforms for dynamic columns.
    i have used template with 10 columns, So from these 10 columns,Columns may vary monthly MIN 2 to MAX 10 depending on
    readings with them  for that month.
    i cannot fix column headings also,Because headings also changes dynamically.
    So Problem is if there is no data in columns,Columns is displayng empty.
    For EX: In this month i have 2 columns data remaining all columns is displaying empty boxes.
    Please suggest me a solution  is this posible in smartforms if i use table also.
    <removed by moderator>
    Regrds,
    MNR
    Edited by: Thomas Zloch on Sep 11, 2011 3:50 PM

    Hi friend,
    See the link below it is having the solution of hiding the columns in smart forms
    Hide table columns in smart form?
    Create a table to display your values with 12 col and hide the columns based on the idea provided in the link above.
    I think this will solve your issue if you still have queries please revert back to me i will help you.
    Thanks,
    Sri Hari

  • Problem with ORA-25240 and msgId:=NULL

    Hi,
    I have a problem with ORA-25240- the documentation says that you cannot specify a message ID and correlation ID int the dequeue- options. However I am getting it setting msgid explicitely to NULL!
    The code snippet is:
    vr_message jms_message_with_header_type;
    vr_dequeue_options DBMS_AQ.dequeue_options_t;
    v_message_handle RAW(16);
    BEGIN
    vr_dequeue_options.deq_condition := 'tab.user_data.header.properties IS NOT NULL AND '
    || 'tab.user_data.get_string_property('MYServicename'') = '''
    || i_MY_Servicename || '''';
    vr_dequeue_options.correlation := i_correlation;
    vr_dequeue_options.navigation := DBMS_AQ.FIRST_MESSAGE;
    -- should be default anyway:
    vr_dequeue_options.msgid:=NULL;
    vr_dequeue_options.wait := DBMS_AQ.NO_WAIT;
    DBMS_AQ.DEQUEUE
    queue_name => 'MYQUEUE',
    dequeue_options => vr_dequeue_options,
    message_properties => vr_message.header,
    payload => vr_message.message,
    msgid => v_message_handle
    Any ideas?
    Thank you,
    Steffen

    Hi,
    the version is:
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
    PL/SQL Release 10.2.0.3.0 - Production
    CORE 10.2.0.3.0 Production
    TNS for HPUX: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    SQL>
    The example behind the link is not complex enough. They are not using deq_condition and correlationId of the deque- options. If I set one of these values to NULL the code works fine but it complains about msgId if I have both values set with msgId=NULL?!?
    Thanks,
    Steffen

Maybe you are looking for

  • MAC MINI AND MB

    does anyone currently have the Intel Mac Mini Core Solo with upgraded RAM and the MacBook (1.83 GHz) with extra RAM??? if so, how much faster is the MB than the mac mini, because i still have a week to decide if i want to return the mac mini

  • Creating an email account?

    Hi, I just bought a new macbook today, and have just put it on, done everything, it's all great! BUT... when you click on mail you have to type in things to configure it... how do you do that? I have a hotmail account, does it work with a hotmail acc

  • How to install Oracle DB on sco unix 5.06

    For soc unix 5.06: Which version of Oracle should I choose? Where can I find the installation document?

  • Su and export

    I have written a file that sets some variables for my oracle 10g instant client. file: /etc/profile.d/oracle-instant-client.sh export ORACLE_HOME=/usr/lib/oracle/10.1.0.3/client export LD_LIBRARY_PATH=/usr/lib/oracle/10.1.0.3/client/lib Now this work

  • Strange path led to unbootable MacBook. Tried everything to revive.

    Happy Holidays everybody. I have a problem that manifested itself Christmas night and I have yet been able to resolve it. I wasn't running much (Firefox, Hardware growler, quicksilver) when this problem occurred. I was following a recipe online and a