How to insert a KPI by comparing two columns

I want to compare the date value under "Start" column and date value under "BL1 Start" column and if they are same I want to use an Indicator in another field and if not same, then another indicator should be displayed in the same field.
Kindly let me know how to do it.
Regards

it is true that you cannot use any 2 parameters (user defined and P6 standard fields alike for that matter) on both sides of the "is" operator in the "if" section of the global change as a condition.
and since the use-case is there, personally i see no good reason why this cannot be so. if any-to-any field comparisons are allowed, any meaningless comparisons of different data types should simply return 0 as their truth value (condition not met) or generate global change report errors
or, more elegant solutions could include more complex "sentences" used as conditions, with more than one operator
e.g. if param_1 < param_2 - param_3,
where param_n is any field (user defined or standard)
also the choice of any parameter as well as operators from dropdown lists should be limited based on the data type of the previously selected parameter(s)
to answer your initial question, the only workaround i can think of is for you to:
*1.* create a user defined field: my_kpi
*2.* use global_change_1 to calculate the value of my_kpi, based any other n number of standard fields, udf's, and/or custom values including PS, CD, current_date_time, substring(), etc to meet your requirements.
use as many "then" lines as needed. no "if" lines required.
e.g.
my_kpi = param_1 + param_2
my_kpi = my_kpi * param_3
my_kpi = my_kpi - some_other_udf
my_kpi = my_kpi / {custom value} division by 0 should be avoided because it will generate errors
this is the equivalent of
my_kpi = ((param_1 + param_2)*param_3 - some_other_udf) / {custom value}
you will probably need one ore two lines with simple divisions or substractions to calculate some relevant value for my_kpi.
e.g.
my_kpi = CD - Planned Finish
my_kpi = my_kpi - {contingency}
*3.* create another udf: my_indicator
*4.* use global_change_2 to assign colour-coded values to my_indicator
if my_kpi < minumum threshold, then my_indicator = red, else my_indicator = green
if you want a 3-colour scale you will need an extra global change to introduce the yellow flag.
the major downside to this is that P6 does not provide (not even v7) solutions for scheduled (jobs), action-triggered or even conditional running of a global change as defined.
it would be nice to have global change batches and have global_change_n triggered by the completion of global_change_n-1, or even to embed one global change (a reference to its definition) within "then" or "else" lines of another global change.
this could significantly enhance (or totally screw up :) the business logic of P6
regards
Edited by: [email protected] on Oct 7, 2009 7:08 PM
Edited by: [email protected] on Oct 7, 2009 7:12 PM

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

  • Create ViewCriteria comparing two columns from same table

    Does anyone know how I can create a ViewCriteria where clause that compares two columns from the same table?
    For example if I had two integer columns (MINSAL and MAXSAL) and wanted to see if they are equal. I would normally do the following SQL below.
    SELECT * FROM EMPL
    WHERE MINSAL = MAXSAL

    It works, but it is not ideal.
    Setup a Transient column that performs a groovy evaluation of MINSAL=MAXSAL and then my ViewCriteria evaluates the column to true and I set Query Execution Mode to Both.

  • How to insert large xml file to XMLType column?

    Hi,
    I have a table with one column as XMLType(Binary XML storage option and Free Text Indexing). When i try to insert a large XML as long as 8kb, i'm getting an error ORA-01704:string literal too long.
    Insert into TEST values(XMLTYPE('xml HERE'));
    How to insert large XML values to XMLType column?
    Regards,
    Sprightee

    For a large XML file, you basically have two options - you can load the string directly as an XMLType, or you can load the string as a CLOB and cast it on the database side to an XMLType.
    If you decide to load the XML as XmlType client-side, then you may be interested to know that versions of Oracle after 11.2.0.2 support the JDBC 4.0 SQLXML standard. See the JDBC driver release documentation here:
    http://docs.oracle.com/cd/E18283_01/java.112/e16548/jdbcvers.htm#BABGHBCC
    If you want to load as a CLOB, then you'll need to use PreparedStatement's setClob() method, or allocate an oracle.sql.clob object.
    For versions before 11.2.0.2, you can create an XMLType with a constructor that includes an InputStream or byte[] array.
    HTH
    Edited by: 938186 on Jun 23, 2012 11:43 AM

  • How to insert the checkbox as a separate column  in alv grid display

    Hi
    How to insert the checkboxes as a separate column  in alv grid display with using the reuse_alv_fieldcatlog_mege.
    example
    matnr    maktx  ersda                 checkbox
    10        books  28/03/2009          checkbox
    Thanks
    chinnu

    Hi,
        Check the following code.
    TYPE-POOLS: slis.
    TYPES:
          BEGIN OF ty_output,
          chk TYPE c,
          number TYPE i,
          name(20) TYPE c,
          END OF ty_output.
    DATA: gt_output TYPE STANDARD TABLE OF ty_output,
          gs_output TYPE ty_output.
    DATA: wa_layout           TYPE slis_layout_alv.
    DATA: it_fieldcatalog TYPE slis_t_fieldcat_alv,
    After you populate the data, build the field catlog like shown below.
    wa_fieldcatalog TYPE slis_fieldcat_alv.
    wa_fieldcatalog-fieldname = 'CHK'.
      wa_fieldcatalog-outputlen = '3'.
      wa_fieldcatalog-col_pos = '1'.
      wa_fieldcatalog-seltext_m   = 'CHK'.
      wa_fieldcatalog-checkbox = 'X'.
      wa_fieldcatalog-edit = 'X'.
      APPEND  wa_fieldcatalog TO it_fieldcatalog.
    wa_fieldcatalog-fieldname = 'NUMBER'.
      wa_fieldcatalog-outputlen = '10'.
      wa_fieldcatalog-col_pos = '2'.
      wa_fieldcatalog-seltext_m   = 'NUMBER'.
      APPEND  wa_fieldcatalog TO it_fieldcatalog.
      CLEAR  wa_fieldcatalog.
      wa_fieldcatalog-fieldname = 'NAME'.
      wa_fieldcatalog-outputlen = '10'.
      wa_fieldcatalog-col_pos = '3'.
      wa_fieldcatalog-seltext_m   = 'NAME'.
      APPEND  wa_fieldcatalog TO it_fieldcatalog.
      CLEAR  wa_fieldcatalog.
      wa_layout-box_fieldname     = 'CHK' .
      wa_layout-box_tabname       = 'GT_OUTPUT' .
    Now call the FM
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
          i_callback_program                = sy-repid
          i_callback_pf_status_set          = 'PF_STATUS'
          i_callback_user_command           = 'USER_COMMAND_GRID'
    *   I_CALLBACK_TOP_OF_PAGE            = ' '
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
    *   I_BACKGROUND_ID                   = ' '
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
          is_layout                         = wa_layout
          it_fieldcat                       = it_fieldcatalog
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *   IT_EVENTS                         =
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   I_HTML_HEIGHT_TOP                 =
    *   I_HTML_HEIGHT_END                 =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = gt_output
    * EXCEPTIONS
    *   PROGRAM_ERROR                     = 1
    *   OTHERS                            = 2
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

  • How do I compare two columns of data in Numbers to find the unique results?

    Hello all,
    I'm looking for a way to compare the data from two columns so I can find the unique results and display that data in a third column. To be specific, here's what I'm doing.
    Column A is a list of email addresses for people I have already written. Column B is a list of email addresses for people I would like to contact. I am not sure if there are email address from Column A in Column B, but there may be and if there are, I must find out so that I don't send a second email to these recipients. How can I have Numbers look at both columns and tell me which email addresses in Column B are not in Column A?
    Thanks for the help!!!

    gfmp123,
    Here's an alternate use of MATCH to find duplicates. I hope you find one of the two solutions, Wayne's or this one, useful for your case.
    The expression in Column C is:
    =IFERROR("Dup in Row "&MATCH(B, A,0), "")
    Regards,
    Jerry

  • How to fetch deleted enteries by comparing two tables

    Hi
    I have two tables:
    1. CrawlOldXml: It contains two columns "ProductName" and "ProductImageUrl". In this table, I have inserted old records like
    Product1, ProductImage1.jpg
    Product2, ProductImage2.jpg
    Product3, ProductImage3.jpg
    2. CrawlNewXml: It contains two columns "ProductName" and "ProductImageUrl". In this table, I insert new records like
    Product1, ProductImage1.jpg
    Product2, ProductImage3.jpg
    Product4, ProductImage4.jpg
    Now as we can see that in CrawlNewXml table Product2 has an updated Image url i.e. ProductImageUrl3.jpg. And also Product3 entry is removed form the CrawlNewXml table.
    I want a query which could give the resulted rows which are deleted i.e. removed from table CrawlNewXml.
    For example if i run a query on CrawlNewXml and CrawlOldXml then its result should be
    Product3, ProductImage3.jpg

    Hi,
    You said, by using the first query, you are getting the updated records and using the second query, you are getting the updated records + deleted records. Now, you want only the deleted records. So, your second query MINUS first query would give you deleted records?
    I.e
    For getting the inserted/updated records :
    Select ProductName, productImageUrl
    From
    Select 'Table A' as TableName, A.Productname. A.ProductImageUrl From CrawlNewXml as A
    Union All
    Select 'Table B' as TableName, B.Productname. B.ProductImageUrl From CrawlOldXml as B
    )temp
    Group By ProductName, ProductImageUrl
    Having count(*)=1)t
    where t.tableName='Table A' Order By ProductName,ProductImageUrlFor getting the Deleted Records :
    Select ProductName, productImageUrl
    From
    Select 'Table A' as TableName, A.Productname. A.ProductImageUrl From CrawlNewXml as A
    Union All
    Select 'Table B' as TableName, B.Productname. B.ProductImageUrl From CrawlOldXml as B
    )temp
    Group By ProductName, ProductImageUrl
    Having count(*)=1)t
    where t.tableName='Table B' Order By ProductName,ProductImageUrl
    MINUS
    Select ProductName, productImageUrl
    From
    Select 'Table A' as TableName, A.Productname. A.ProductImageUrl From CrawlNewXml as A
    Union All
    Select 'Table B' as TableName, B.Productname. B.ProductImageUrl From CrawlOldXml as B
    )temp
    Group By ProductName, ProductImageUrl
    Having count(*)=1)t
    where t.tableName='Table A' Order By ProductName,ProductImageUrl-Arun
    P.S : You seem to have a table without a primary key. Tables with this kind of design would yield you to this kind of difficulties ;-). Time to refactor your database design.

  • Compare two columns between two tables

    Hi all,
    I have two separate datasets in Table 1 and Table 2.
    Both datasets have Column A First name and Column B Last name in common.
    The data in the subsequent columns is different.
    Some of the people listed in each table are the same.
    I want to delete the people from Table 1 who are in table 2.
    If I run a formula like this =COUNTIF(Table 1 :: A2:A200, A2) I can return a 1 or 0, use conditional formatting to colour that cell, sort the table and delete all the rows containing 1.
    However that only checks for First Name.
    What I need to do is check if First name AND Last name in Table 1 are the same as First Name AND Last Name in Table 2 - and then return a True of False (1 or 0 or anything) in a separate column.
    Please help.
    Thanks in advance.
    M.

    Moich wrote:
    Presumably this lets me compare multiple values across multiple tables also?
    Moich,
    As you will see as you become familiar with this function, it can only count rows in one table. The comparison (criteria) values can come from anywhere, but what you are counting are "records" that meet the multiple criteria. A record is one row. I think that was your question, but I'm not positive.
    I can't seem to find how to insert formulas into the conditional rules.
    You'll have to put the formulas elsewhere and refer to them with simple comparisons.
    Jerry

  • Compare two columns and match ALL recurring values, not just the first instance

    Hi everybody...
    I was looking for a way to compare values in two columns, identifying every duplicate value instance on a third column.
    Searching around the forums, I found a solution, albeit a partial one; I am using this formula: =IFERROR("Duplicate in row "&MATCH($A,$B,0),"") along column C, to compare values between columns A and B. When applied, the formula will render the first instance where there is a duplicate; unfortunately MATCH will only register the first instance of the duplicated values.
    For example:
    The first value on column A is 'Apple'. On column B there are three instances for the value 'Apple', the formula identifies the first of these values, but not the remaining two.
    I am not an advanced Numbers or Excel user, and the answer to this problem eludes me. I am attempting to compare columns that have no less than 1000 rows each, so you can imagine how, finding a solution to my problem would be really great.
    Thanks in advance,
    Pablo

    Unfortunately I can't see your screenshot, but supposing you have a table like this:
    Col1
    Col2
    1
    3
    Dupe
    2
    4
    Dupe
    3
    5
    Dupe
    4
    6
    5
    7
    Then here is one way to flag the duplicates.
    The formula in C2, copied down, is:
    =IF(COUNTIF($A,$B2)≥1,"Dupe","")
    Then filter on column C for 'Dupe', and copy the values in column B to wherever you need them.
    SG

  • Compare two columns

    hello,
    i want to compare the two columns A and B which contain numbers and then select a table with "A is smaller", "B is smaller" or "A and B are equal".
    for example if i have this table:
    A______________B
    1______________5
    3______________2
    4______________7
    9______________-1
    2______________2
    the result should look like this:
    RESULT
    A is smaller
    B is smaller
    A is smaller
    B is smaller
    A and B are equal
    how should my query look like?
    thanks in advance!

    SQL> select * from t;
                       A                    B
                       1                    5
                       3                    2
                       4                    7
                       9                   -1
                       2                    2
                       0
                                           42
    8 rows selected.
    SQL> select a
      2        ,b
      3        ,case
      4             when a > b then 'B is smaller'
      5             when a < b then 'A is smaller'
      6             when a = b then 'A and B are equal'
      7             else 'can''t compare nulls'
      8         end result
      9  from t;
                       A                    B RESULT
                       1                    5 A is smaller
                       3                    2 B is smaller
                       4                    7 A is smaller
                       9                   -1 B is smaller
                       2                    2 A and B are equal
                       0                      can't compare nulls
                                           42 can't compare nulls
                                              can't compare nulls
    8 rows selected.

  • How to Insert check box value into database column

    Hi All,
    I had checkbox group in a region which is using an LOV......and having 18 items in that lov.
    i.e. Total 18 checkboxes in Total. User has to select only 2 checkboxes from that 18.
    I created two columns for storing two values of checkboxes. How to insert two selectives in two columns.........Moreover, How to give the query i.e. how to know which values are selected.
    Please Help me in achieving this. apart from the two columns (Focus1,Focus2) .......One more column(l_spo_val) is there which is a foreign key.
    My Insert Statement is like this:
    INSERT INTO SPO_RESEARCH_FOCUS VALUES(l_spo_val
    ,:P4_RESEARCH_LIST_1
                        ,:P4_RESEARCH_LIST_2);
    Please narrate the code if possible.
    Thanks,
    Sekhar.

    Hi Denes,
    I saw the example in your workspace and it is the same what exactly i want and instead of storing in one column i want to store the two selected values into two different columns. Also i need to restrict the selection of checkboxes upto 2 only. So If the user tries to select the third check box it doesnt have to accept.
    Even I am ready to change my table as according to your example i.e. creating only one column. Store the values of selection into that column.
    I was unable to see how u wrote the logic (Code) for your example in your workspace. It helps alot if you provide me the code for that example(Multi Checkbox One Column).
    I was facinated after watching your examples in your workspace and am very much interested to know more about Apex.
    Please help me insolving this as it is long pending issue for my requirement.
    Thanks a lot again,
    Sekhar.
    Edited by: Sekhar Nooney on Mar 26, 2009 4:35 AM

  • How to map single input value to Two columns of Database table using format file of Bulk Copy Process

    Hi All,
    Am using OPENROWSET to load the file data into table, here the problem is i need to map same input value to two different columns of table, As format file doesn't allow the duplicate numbers am unable to insert same value to two columns, please help me to
    find a solution for this. 
    i can use only OPENROWSET because i need to insert some default values also which come based on file. only the problem is how to map same input value to two different columns of table. please give me the suggestions.
    Thanks,
    Sudhakar

    From what you say:
       INSERT tbl(col1, col2)
          SELECT col1, col1
          FROM   OPENROWSET(....)
    But I guess it is more difficult. You need to give more details. What sort of data source do you have? What does your query look like? The target table?
    Erland Sommarskog, SQL Server MVP, [email protected]
    Hi Erland,
    Thanks for your response
    my source file is text file with | symbol separate for ex:
    1002|eTab |V101|eTablet|V100|Logic|LT-7|Laptops|SCM
    Database table have columns like
    column1,column2,column3...etc, now i need to insert same value from input file into two columns for ex:
    the eTab value from text file has to be insert into column2 and column3 of
    table
    we cannot change format file like below one
    for the above situation how can we insert eTab into column2 and column3
    Thanks,
    Sudhakar.

  • How to insert data to the specified row column of the multi column list box

    Hi All
    How do i insert data into the specified column of the multi cplumn list box?
    I have a table that containsall station nos and name.Then another table contains the data the various stations having at  for 24 hrs.That is 12 am to 11 pm.
    And i want to display each stations details as follows using a multi column list box/table
    My stationinfo table
    stnno   stnname......................
    s1           stn1
    s2            stn2
    s3             stn3
    The other table
    stnno      sysdatetime       data
    s1             12am                   1
    s2              12am                   4
    s1               1  am                 2
    So the station s1,s2.... will have data for 24 hrs.
    And i want to display it as follows using a multicolumn listbox
    stnname        12am   1 am ......................................11pm
    s1                   ...................
    s2                 ........................
    What i have in my  mind is to get all station nos
    and in a for loop get the station's data from 12 am to 11 pm
    or
    select every statios data for each hor.But in this case i have to query the database 24 times.So i dont think its a good way.
    Or any other better query available?
    Can anybody suggest me a good idea?
    One more thing...how to insert data into the specified field row or column of a multi column list box?
    Thanks in advance

    hi
    i want to know,,can u say ur need clearly...and i attached two image u see that one
    Indrajit
    | [email protected] | [email protected] .
    Attachments:
    station.JPG ‏35 KB
    station2.JPG ‏79 KB

  • Comparing two column values with multiple Parameter in VC (Indicator)

    Hello VC experts,
    GM
    I would like to know about how to indicate multiple parameter with different colour in same column and also comparing value with adjucent column.
    Eg.
    Parameters     ,,           Column1      ,,              Column 2       ,,            Indicator (Image)
    Parameter 1    ,,             a1             ,,                     b1          ,,                  RED
    Parameter 2    ,,            a2              ,,                     b2          ,,                  GREEN
    Parameter 3    ,,            a3              ,,                     b3          ,,                 
    Parameter 4    ,,            a4              ,,                     b4          ,,
    In case I  : Parameter -1     Column 1 ( value)  =  more is better compared to Column 2
    In case II : Parameter -2     Column 1 ( value)  =  Less is better compared to Column 2
    How to acheive this  INDICATOR based value comparison.
    Edited by: Sunil  B. Mundhe on Mar 7, 2009 6:30 AM
    Edited by: Sunil  B. Mundhe on Mar 7, 2009 6:38 AM

    Hi
    This is possible in VC. You have to insert 'Image' UI in the required table. Add images of alert through 'Image manager' (Tools tab). Select relevant images of alert in 'Image' UI. In display there is option for 'visibility condition' there you enter condition (like if greater than ,true,false).
    Like wise you can add multiple 'Image' UIs in that table & based on visibility conditions you will get these alert images in table.
    Regards
    Sandeep

  • How to insert an upper value into a column?

    Hi!,
    I need to insert an upper value into a column.
    The data is on a flat file and it could be lowercase or uppercase?
    Do I have to create a trigger to solve this problem?
    How could the trigger be?
    Thanks,
    Alex

    If you are using SQL*Loader to load the data from flat file into the db table, then you can achieve inserting the UPPER Case of column value in your sqlloader ctl file itself as in below example
    LOAD DATA
    INFILE *
    APPEND INTO TABLE XXX
    ( field1 position(1:7) char "UPPER(:field1)",
    field2 position(8:15) char "UPPER(:field2)"
    BEGINDATA
    Phil Locke
    Jason Durbin
    So in this case the Names Phil Locke and Jason Durbin will be inserted as PHIL LOCKE and JASON DURBIN into the target table.
    Regards,
    Murali Mohan

Maybe you are looking for

  • Error while running jms program in eclipse

    Hi, Friends.I am new to forum.This is the first question I am posting.I am new to Java Messaging service.While running the program in eclipse I am getting the following error... javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for '

  • Bookmarks panel and page

    Hi experts I have set my pdf Initital View properties like in the screen shot. But the Bookmarks panel and page and window controls are not appearing while I open the PDF? any suggestions? I am using windows XP service pack3 Acrobat 9 Thanks in advan

  • Composite Primary Key question

    I have a new question regarding composite primary keys on another table I have created. I have the following table with the following definition: CREATE TABLE "APSOM"."CPULIST" ( "CPU_ID" VARCHAR2(10 BYTE), "SERVER_ID" VARCHAR2(10 BYTE), "CREATED_DAT

  • My firefox has stopped working, It says "Firefox can't establish a connection to the server at (website)"

    I have tried uninstalling it and re-installing it but its still not working! Could anyone help me with what to do? Because ive tried other browsers and i dont like them!

  • IPod Artist Playlists ???????????

    Hi NONE of my songs are in my artist playlist on my iPod BUT are on the playlists on iTunes. Why is this its driving me CRAZY!!! On the GET INFO of each song i only have artist and song name not album, year etc... is this the cause. Thanks.