Formula Logic for Dates in the Cell Editor in Query Designer

Hi All
We are on BI7. (This is in the Cell Editor in Query Designer)
I am trying to create a formula in one cell that enters a date based on the following logic (Lets call this formula A):
I also have a placeholder "Cell reference" for a Date in another cell in the Cell Editor (Lets call it B).
I also have two other dates in seperate cells in the Editor (Lets call them C and D)
What i need to do is check that either C or D are not blank i.e one at least has a date and if so enter the date that is in B in A.
My formula logic in (Cell A) at the moment is as follows:
( Cell C <> 0 ) OR ( Cell D <> 0) * Cell B
When I run the query It is coming back with either a 1 or  0 depending if there is a date in C or D.
What I want it to do is to display the actual date of  'Cell B'  in 'Cell A' if  ( Cell C <> 0 ) OR ( Cell D <> 0)
If the value of B is blank ie no date I also want A to be blank i.e not equal zero or a blank date ie 00/00/0000
Example 1
Cell A    08/09/2009
Cell B    08/09/2009
Cell C   15/03/2010
Cell D
Cell A should = 08/09/2009 as there is a Date in Cell C or D and if so enter the date of Cell B in cell A
Example 2
Cell A   
Cell B    08/09/2009
Cell C  
Cell D
Cell A should = BLANK as there is a NO Date in Cell C or D
Example 3
Cell A   
Cell B  
Cell C   15/03/2010
Cell D
Cell A should = BLANK as there is a No Date in Cell B although a Date in cell C or D.
Thank you for assistance in advance
Kind regards
Stevo

Hi there,
It seems you have done almost everything...
What it seems that is missing is probably the cell reference for Cell C and for Cell D, or did you forget to mention it here?
So here it is the big idea:
- In the Cell Editor of the query designer, create a new cell reference for Cell C, let's name it ref_cell_c;
- In the Cell Editor of the query designer, create a new cell reference for Cell D, let's name it ref_cell_d;
- In the Cell Editor of the query designer, create a new cell reference for Cell B, let's name it ref_cell_b;
- In the Cell Editor of the query designer, create a new formula for Cell A, let's name it form_cell_a;
The form_cell_a should be created by the following:
( COUNT(ref_cell_c) + COUNT(ref_cell_d) ) * ref_cell_b
So COUNT(operand) returns 1 if operand is different of 0 else it returns 0; So if ref_cell_c has any valu or ref_cell_d has any value it should return the value of ref_cell_b.
Please note that with this formula, if you have values in both ref_cell_c and ref_cell_d this formula returns 2 * ref_cell_b, which is not what you pretend, I'm assuming you'll have value only for the following combinations:
ref_cell_c has value but ref_cell_d don't have any
ref_cell_c don't have any value but ref_cell_d has a value
ref_cell_c don't have any value neighther has ref_cell_d any
Diogo.

Similar Messages

  • Create a VC Model for BEx queries with Cell Editor

    Hello All,
    I am trying to create a VC Model for BEx queries with Cell Editor.
    BW Development Team has created a BEX query with complex restrictions and calculations using Cell Editor feature of BI-BEX.
    The query output in BEx analyzer is correct where all values are being calculated at each Cell level and being displayed.
    But, while creating VC model, system is not displaying the Cells.Thus, no VC Model can be created.
    I have executed below steps:
    1. Created a VC Model for BEx Query - ZQRY_XYZ
    2. Create Iview -> Create a dataService -> Provide a Table from the Output
    In the Column field system is not showing any of the Cells (present in Cell Editor)
    Please help me to solve this issue.
    Thanks,
    Siva

    Hi
    If 'Cell Editor' is been used then that query must have the structure in it. You have to select that 'structure' object in your 'VC Table'.
    If you select that then you will get the required result in the output. This structure will be the structure where 'cell reference' is used in BI query, You have to select that structures name.
    Regards
    Sandeep

  • Dynamically change the cell editor in the table control

    Hi..
         I have 3 columns in a table . of which in one column we need to change the cell editor dynamically at runtime.
    i.e for example i have  columns as carrid, connid and fldate.
    For the first 2 rows the cell editor for the carrid  clomn shud be a dropdown and from there on in the next rows for the same  carrid column it shud be a input field.
    Can experts plz help me how to achieve this as this is very high priority issue....
    Regards,
    Madhu...

    This is actaully fairly simple to do.  You will need to add a cellVariant to your table column. You can then dataBind a context attribute to the selectedCellVariant property of the column to control which cellVariant will be used. This allows you to control row-by-row which cell editor you want to output.
    http://help.sap.com/saphelp_nw70/helpdata/EN/bd/5d9041d3c72e7be10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/56/5e9041d3c72e7be10000000a1550b0/frameset.htm
    Also here is an example that I did the other day that uses Cell Variants within ALV.  This process is actually a little more complicated because you have to go through the ALV APIs.  To do this in a normal table is actually easier because you can create the cellVariant in the layout designer.
    Re: Freely-programmed value help for a single ALV cell

  • Changing Data in the Cells in webanalysis

    Hi
    Iam trying to change Data in the cells,in my report for the combination's which i didn't have data it is showing as (-99).
    according to my functionality '-99' means 'NO',my USER is asking instead of showing -99 it has to display 'NO'.
    I tried to change the display from -99 to 'NO' through "CONDITIONAL FORMATTING" but it was not happening can anybody plz gave me the solution how to change the display.

    Hi,
    When you execute your report, You press right button in your mouse over the column. Later, you select Analyis Tools->Analysis Tool Manager.
    A box appear on your screen and you press double click in the column format (that you need) , another window appears and you press a button called Data Format.
    A window appear and yo find the label "Substitution" (Or something like that) and you select Text and put the text that you need.
    I don't know if You'll understand... but I can send you the images with steps.
    PD: My options are In spanish and maybe the configuration is a little different in English.
    Regards.

  • Is there a shortcut for compiling in the procedure editor e. g. F9

    Hi,
    Is there a shortcut for compiling in the procedure editor e. g. F9 like in the SQL-Worksheet? I can't find anything about shortcuts in the help.
    Regards, Juergen

    When I try to open a procedure saved in a text file with .sql extension, the editor does not show the options those are available when I open directly from the database e.q Collapsible option at the side of evert proceure/function, IF statements and LOOPing constructs.
    Am I missing something or the feature isn't there yet.
    Regards
    Ray

  • Structure data in the spreadsheet using BEx Query filtered by year

    Hi,
    I´m making a Balanced Scoredcard using Xcelsius and extracting data from SAP BI.   The customer asked to see a few KPI´S (Return on assets and profit margin) filtering data from the dashboard by year,  month and region.
    The problem I´m facing is how to structure the data in the spreadsheet using a query filtered by year variable. 
    Regards,
    Diego

    Hi,
    I´m making a Balanced Scoredcard using Xcelsius and extracting data from SAP BI.   The customer asked to see a few KPI´S (Return on assets and profit margin) filtering data from the dashboard by year,  month and region.
    The problem I´m facing is how to structure the data in the spreadsheet using a query filtered by year variable. 
    Regards,
    Diego

  • Structres and cells in Bex query designer?? urgent plz

    hi experts,
    could you please give me the useful info. regarding structres and cells with the examples.
    thanks in advance
    regards
    vadlamudi

    1. In the Query Designer, choose Cells (open) from the toolbar or use the menu option under View to reach the Cell Editor functions.
    2. You can now use four different functions.
    New Selection
    u2022 Select a cell in the Cells dialog box, and use the right mouse
    button to choose New Selection.
    u2022 Define the required selection.
    u2022 Enter a description for the selection and choose OK.
    New Formula
    u2022 Select a cell in the Cell dialog box, and use the right mouse button to choose New Formula.
    u2022 Define the required formula. Enter a description for the formula
    and choose OK.
    New Cell Reference
    Each cell that you define can be reused in formulas. If you want to reuse the value of the implicit generic cell definition that automatically occurs at the intersection of two structure parts of a query, select this cell in the Cell Definition dialog box, and choose New Cell Reference using the right mouse button. The description arising from the two structure parts
    automatically appears in the cell. You can now refer to this cell.
    Additional cells
    Click on the cell adjacent to the Help Cells and choose the required option if you need additional cells for auxiliary selections or formulas which are not already included in the query structure you have defined from the construction of rows and columns.
    Ashok

  • Drill down by customer only for 1 year (only total then) in query designer

    Hello experts,
    I face a need I don't manage to fit with the query designer. It sounds easy, but I didn't find solution after few trials.
    The target report has to look like that :
           01.2010   02.2010   03.2010   04.2010   u2026   12.2010   Total
    Customer    
      cust 1        ratio          ratio         ratio          ratio    ratio     ratio     Total
      cust 2        ratio          ratio         ratio          ratio    ratio     ratio     Total
      cust 3        ratio          ratio         ratio          ratio    ratio     ratio     Total
      cust 4        ratio          ratio         ratio          ratio    ratio     ratio     Total
      cust 5        ratio          ratio         ratio          ratio    ratio     ratio     Total
      cust 6        ratio          ratio         ratio          ratio    ratio     ratio     Total
    Year 2010   total          total          total          total    total      total      total
         2009      total           total          total          total    total      total      total
         2008      total           total          total          total    total      total      total
         2007      total           total          total          total    total      total      total
    The particular point disturbing me is to display detailled ratio according to customer caractéristique ONLY for the current year (2010) and ONLY TOTAL for past years.
    Thanks in advance for help, points will be awarded.
    Guillaume

    Hi Petiaux,
    All the replies have been correct & all you need to do is a combination of a few. A step-by-step approach for your report, I'll explain in detail, and please correct me if I'm wrong.
    01.2010 02.2010 03.2010 04.2010 u2026 12.2010 Total
    Customer
    cust 1 ratio ratio ratio ratio ratio ratio Total
    cust 2 ratio ratio ratio ratio ratio ratio Total
    cust 3 ratio ratio ratio ratio ratio ratio Total
    cust 4 ratio ratio ratio ratio ratio ratio Total
    cust 5 ratio ratio ratio ratio ratio ratio Total
    cust 6 ratio ratio ratio ratio ratio ratio Total
    Year 2010 total total total total total total total
    So, the above is the first set of details you need to make. Follow up by using offsets for 1 variable followed up till the 12th month. Create a variable for 0CALMONTH (Cal Yr-Month) in a selection. Follow up by copying this variable 12 times, changing the offset of the input varaible to +1, +2, etc..
    Now for the next set as below, there are 2 approaches.
    2009 total total total total total total total
    2008 total total total total total total total
    2007 total total total total total total total
    1. If you are using i/p variable as Cal-Month, then its best you can approach to find the differences by making a selection for the same variable in a range like New Var (EnterMonth -12 : Enter Month -23 ). Same fashion, approach to calculate (EnterMonth - 24 : EnterMonth-35) etc. But limitations are there for this approach, as you need to select ranges & with each year you need to update the query.
    2. Use CELL Editor: At the top of the icon tray, you can notice a 'cell' symbol, wherein you can find the cell editor. Under the 2009, 2008, 2007 headings you can choose to create a selection with following restrictions: 0CALYEAR (Cal Year) as varaible. But the only thing here is the input variable for this query must be 2 seperate variables > One CALYEAR & another CALMONTH. So this is another approach, where user will have option to enter cal month & cal year seperately in 2 different text input boxes.
    3. Perform the calculation for 2010. Copy the same for 2009,2008,2007 etc with offsets. You can try hiding the rest of the month feilds, after calculating the total for all months of the years in 2009,2008 etc using offsets. Although it sounds crazy idea, but sometimes if customers require such an output we need to do something crazy though. I hope it might work, but as stated its the last option if nothing works out.

  • Can i get the history tab in query designer in bw 3.5 version

    can i get the history tab in query designer in bw 3.5 version plz help me.

    Hi,
    yes..
    do this..
    Go to SPRO->IMG->SAP NEtweaver->SAP BIW->Reprting-relevant Settings->General Reporting Settings in BEx->Activate personalization in Bex.
    Regards,
    San!

  • How to use the cell editor in FICO reports for YTD

    HI experts,
    I am working with BI7.0, in the below report, i have displayed result based on user input.but how to calculate the YTD values. User will give the input like 072007, results will be display one year from 072007 to 062006 (one yearback) and one more column is YTD
    Report structure is :
         user input(single value): 072007
              AUG06....JAN07....JULY07....YTD
    KEYFIGURE-1        453      -
    777     -
       232       -
      777 (Only Jan07 value of Keyfigure-1)   
    KEYFIGURE-2        879      -
    233        -
    123       -
      ???? (only sum from Jan07 to July07)
    KEYFIGURE-3        212            -
    879      -
    989                -
    KEYFIGURE-4        234            -
    656      -
    788                   -
    KEYFIGURE-5        345            -
    878      -
    878                 -
    KEYFIGURE-6        767            -
    767       -
    323                 -
    KEYFIGURE-7        879            -
    878     -
    999                -
    999 (Only last value of keyfigure-7 (July07)
    in the above report, total 7 keyfigures so 7rows of YTD column
    1) in the first YTD column, how will display only one value (keyfigure-1) of Jan07?
    2) in the last YTD Column, how will display only one value (keyfigure-7) of July07?
    3) from 2 to 6 columns of YTD, how will display the sum from Jan07 to July07?
    Note: months will be changed based on user input(single Value)
    how can use cell editor for above the senior.
    if any option is availabel please let me know
    Thanks
    kishore

    I think the following should work:
    Context:
    Rows (node,c=0:n)
    --- rowIndex (integer)
    selectedRowIndex (integer)
    Bind the "selectedKey" property of the radio button (cell editor) to attribute "selectedRowIndex" (outside table data source node) and bind "keyToSelect" to attribute "Rows.rowIndex". Make sure that the "rowIndex" attribute will contain the index of the node element in node "Rows".
    Armin

  • How can I select a radio button in a table regarding the data in the cells?

    Hi everyone
    This is the issue: I need to select the RadioButton which is in a table with data related to transfers in the cells next to it, so I need to select the correct radio regarding the data next to it.
    This is the whole process: First I go to the Add Recurring Transfer section and select the parameters of the transfer (Accounts, date, amount, months etc), then with VB code I capture those parameters from the page and store them into Global variables for further usage on my E-tester script.
    Right after that I need to select the radiobutton regarding the data of the transfer that I already created in order to delete it or modify it (Please see Attachment selectradio1.jpg)
    So How can I move along the table and compare each cell with the variables that I created with the transfer information, so when I finish comparing a row cell by cell and if all the comparison match well in that row, I could select the radiobutton of the row.
    Note: Second Attachment selectradio2.jpg shows the source code of the table...If you need more info please let me know
    Could you please help me with this problem?? I'm Kind of frustrated with this issue jejeje

    Here is an example. I uploaded mock html so that you can actually try this code. I think this does exactly what you are asking.
    Private Sub RSWVBAPage_afterPlay()
    Dim tbl As HTMLTable
    Dim tblRow As HTMLTableRow
    Dim tblCell As HTMLTableCell
    Dim strValue As String
    Dim rButton As HTMLInputElement
    ' ******** This would be your global variable. I put this so that values are seperated by a semicolin you can use what ever format works for you.
    strValue = "03/22/2008;03/22/2008;*************1977;*************1977;$25.25;Jan, Jun, Jul, Dec"
    ' Strip out the ; for inner text comparison
    strValue = Replace(strValue, ";", "")
    ' This will get the table but can be modifoed to be more specific
    Set tbl = RSWApp.om.FindElement(, "TABLE")
    ' This loops through all the rows in the table until a match to the strValue is found
    ' then clicks the radio button. Findelements allows you to specify a root element
    ' once the correct root row is found, FindElemets can get the correct radio button
    For Each tblRow In tbl.rows
      If tblRow.innerText = strValue Then
        Set rButton = RSWApp.om.FindElement("account", "INPUT", "NAME", , , tblRow)
         rButton.click
       End If
    Next
    End Sub
    I also uploaded the script I created. You should be able to run it and see how it works.
    This should get you going.

  • Enrollment of Benefits for a dependent and for date in the past

    Hello Experts-
    Can anyone let me know? What kind of changes need to be done on backend and portal for enrollment iview to enable a date in past for enrolling a dependent to the benefits..
    Thanks,
    Raj.
    Edited by: raj1234 on Feb 25, 2011 9:16 PM

    The way we have configured this as follows:
    -  We ask employees to first add all the dependents to the system before beginning their enrollment process.
    - Adjusted the Use cases for the Dependent infotype and subtypes accordingly.
    - Implemented the BADI (with custom logic for DEFAULT_DATE) HRXSS_PER_BEGDA to control the start date of the enrolled dependents.
    - We control the start date of the dependent records created in various ways (birth day of dependent, employee start date, adjustment reasons, ... )
    With this, we are able to provide employees with the ability to add dependents as of a past date and hence enroll dependents in Benefit plans as well.
    - Shanti

  • Using translate for date in the control file !!

    Hi,
    I am having data file where in i expect date but get non-numeric character.
    I am generating control file dynamically (programatically).
    While creating control file i know that here the type of data will be date so i put datatype as date. But at one place i got non numeric character instead of date.
    Now i want to put somekind of logic built in my dynamic generation which will check whether if value within that column is character then make it null and then load data. And if it is numeric keep it as it it.
    i.e.
    if(non-numericChars)
    make value null before loading.
    else
    keep the value as it and then load it.
    I heard that with translate function we can do that. Right ?
    So if i have a line like this in my control file:
    column_Name date "MM/DD/YYYY HH:MI:SS AM"
    How should i write the above statement to put the above mentioned logic.
    Any help would be highly appreciated.
    Regards,
    Dipesh

    and Perhaps TO_DATE can help you :
    TO_DATE
    Syntax
    to_date::=
    Text description of to_date
    Purpose
    TO_DATE converts char of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype to a value of DATE datatype. The fmt is a date format specifying the format of char. If you omit fmt, then char must be in the default date format. If fmt is 'J', for Julian, then char must be an integer.
    Note:
    This function does not convert data to any of the other datetime datatypes. For information on other datetime conversions, please refer to TO_TIMESTAMP, TO_TIMESTAMP_TZ, TO_DSINTERVAL, and "TO_YMINTERVAL".
    The default date format is determined implicitly by the NLS_TERRITORY initialization parameter, or can be set explicitly by the NLS_DATE_FORMAT parameter.
    The 'nlsparam' has the same purpose in this function as in the TO_CHAR function for date conversion.
    Do not use the TO_DATE function with a DATE value for the char argument. The first two digits of the returned DATE value can differ from the original char, depending on fmt or the default date format.
    Note:
    This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.
    See Also:
    "Date Format Models"
    Examples
    The following example converts a character string into a date:
    SELECT TO_DATE(
    'January 15, 1989, 11:00 A.M.',
    'Month dd, YYYY, HH:MI A.M.',
    'NLS_DATE_LANGUAGE = American')
    FROM DUAL;
    TO_DATE('
    15-JAN-89
    The value returned reflects the default date format if the NLS_TERRITORY parameter is set to 'AMERICA'. Different NLS_TERRITORY values result in different default date formats:
    ALTER SESSION SET NLS_TERRITORY = 'KOREAN';
    SELECT TO_DATE(
    'January 15, 1989, 11:00 A.M.',
    'Month dd, YYYY, HH:MI A.M.',
    'NLS_DATE_LANGUAGE = American')
    FROM DUAL;
    TO_DATE(
    89/01/15
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions137a.htm#SQLRF06132
    Joel P�rez

  • ABAP - Logic for finding out the active employee

    Hi,
    I am trying to write the program where i need to set the flag "YES" to active employee for the particular time period for the particular position.
    For example:
    Row     Employee     DateTo     DateFrom          Position     FLAG
    1     1     1.1.2009     31.1.2009          10     YES
    2     1     1.2.2009     1.3.2009          10     NO
    3     1     2.3.2009     31.3.2009          10     YES
    4     1     1.4.2009     31.12.2009                           11     YES
    5     2     1.1.2009     31.1.2009          12     YES          
    6     2     1.2.2009     1.3.2009          10     YES
    7     2     2.3.2009     31.12.2009                           13     YES
    Employee 2 gets assigned as of 1.2.2009 to the same position 10 on which employee 1 is already assigned. Therefore, as of 1.2.2009 emplyoee 1 is not anymore the primary employee of position 10. As employee 2 is leaving the position as of 2.3.09 employee 1 gets again primary employee of that position as of 2.3.2009.
    Can any1 suggest me the logic for this?
    Regards,
    Rashmi
    Edited by: Rashmi G P on Jul 13, 2009 9:13 AM

    Hi,
    I already have a customised table where i am  trying to set the flag.
    My logic is something like this:
    Declarations:
    DATA: pos_flag TYPE char5.
    select-OPTIONS : pos for /bic/qzemployee-/bic/zhrpostn.
    SELECT zemployee datefrom dateto pos_flag FROM zemployee INTO CORRESPONDING FIELDS OF TABLE
    it_QZEMPLOYEE where /bic/zhrpostn in pos.
    *Sort it_zhrpostn by postion and datefrom
    SORT it_QZEMPLOYEE BY /bic/zhrpostn datefrom.
    *Looping it_zhrpostn.
    LOOP AT it_QZEMPLOYEE.
    MOVE-CORRESPONDING : it_QZEMPLOYEE TO it_qzemployee_temp.
    *Appending it_zhrpostn_temp to collect each postion
    APPEND it_qzemployee_temp.
    *At end of position
    AT END OF pos_flag.
    *Looping it_zhrpostn_temp table
    SORT it_qzemployee_temp BY datefrom DESCENDING.
    pos_flag = 'YES'.
    LOOP AT it_qzemployee_temp into wa_qzemployees.
    IF pos_flag = 'YES' OR wa_qzemployees-/bic/zhrpostn EQ '00000000' OR wa_qzemployees-/bic/zhrpostn EQ '99999999'.
    set the flag to yes
    write:       pos_flag.
    INSERT into /BIC/AZPA_DS0600 VALUES wa_final.
    pos_flag = 'NO'.
    ELSE.
    set the flag to NO
    write:       pos_flag.
    ENDIF.
    endloop.
    refresh: it_qzemployee_temp.
    ENDAT.
    endloop.
    But here the problem is the it is taking the most recent datefrom and setting the flag as yes. How to check whether someother employee is active in the given time period and set the flag as YES? Only 1 employee can be active in the date period given.
    Thanks and Regards,
    Rashmi

  • Formula variable for date in report

    Hi All,
    I have to display the last date value of a particular date in the report.
    For a better understanding,
    I have Customer, Equipment, Service date, Amount
    In the report, I have to display
    Customer, Equipment, Last Service date, Last Service Amount.
    I have created a formula variable (Formula variable for Service date) for Service date with Replacement path.
    Replace Variable with Infoobject, Replace with Key, Dimension dates.
    And in Key figures, I have created a formula (Last Service date) with Last value in the Aggregation using the "Formula variable for Service date".
    The Last Service date is displayed as 'X' in the report since the Service date is not in the row. I cannot have the service date in the row either (not even by hiding the display).
    Kindly tell me how to rectify this problem.
    Thanks and Regards
    Adhira Anand.

    The X is appearing because, with the drill downs you have added, you have more than 1 date value to choose from when you attempt to aggregate.
    Have you tried using APD instead of exception aggregation?
    Have you built the exception aggregation calculated key figure globally or just locally (i.e. as a structure element)? It must be built globally to work properly.

Maybe you are looking for

  • HT1386 How can I sync only selected playlists from my library in iTunes to iPhone?

    Option to sync only selected playlists is grayed out in iTunes for my iPhone. How can I make it so I don't have to sync my entire library?

  • Report on conference room usage?

    Exchange 2007 SP3 I've been asked to create a report on conference room usage at our company.  They want to know which rooms are booked and for how long, as well as overall availability of conference rooms.  The idea is that they want to shut down an

  • One Step Stock transfer

    Hello All, Can you please let me know the answer to the problem that I am facing. Can we transfer the stock from one plant to another plant in one step stock transfer procedure taking the reference of STO already created ? I know that it is done in M

  • Refresh security from Shared Services fails - System11

    Hi All, WHen refreshing the Essbase security from Shared Services in System 11 we get the following error: Error 1051522: Essbase failed to get group's member tree with Error [CSS Error: Unknown error: Could not get exception message from exception o

  • PSE 5 Organizer resize Media Player

    I use Adobe Photoshop Elements 5.0 with Premiere Elements 3.0 to organize and edit photos and videos. In the Organizer, each time I open a video in the catalog the player is too large - spans from the top blue bar down to UNDERNEATH the blue Toolbar.