Compare two characteristics in Query

Hi Experts,
I have to compare two characteristics in Query fields like (A)Approved Level of Job(contain values like 01,02,03,04) and (B)Required Level of Job(contain values like 01,02,03,04).
Now I have to do these calculations
If A>B =1
If A<B =0
And also in other case
If A=b  then value 1
Of A =/= B then value 0
Please let me know how I can achieve this.
These values could be in A,B,C,D instead of 01,02,03,04 then in that case how I will calculate these comparison.
Thanks
Take care
Vishal sharma

Hi,
i need the solution in this format on the comparison two characteristics in Query:
0=false
1=true
Approved Level of Job(A)     Required Level of Job(B)      A=B         A not equal  B     A>B               A<B
     1                                                         3                                       0                         1                      0                 1
     4                                                         2                                       0                         1                      1                 0
     3                                                         3                                        1                         0                      1                 1
     5                                                         4                                       0                         1                      1                 0
     1                                                         2                                       1                         1                      0                 1
count(A):5                        Count(B)5                                 sum 2                 sum 4           sum 3         sum 3
so my CKF will be
A>B/5 means 3/5=60%
I also need to know how i am going to count A and B too.
thanks
take care
vishal sharma

Similar Messages

  • Comparing two characteristics in query.

    Hi,
    In my CKF, I want to compare two different characteristics. Field 1 contains the value 'Y' and 'N' while Field 2 contains the value 'SP' and 'MP'. I tried to create a formula variable using key but the dimension ID supports does not give option of char.
    In the query i am trying to compare both the fields:
    ((Field 1 == 'Y')AND(Field 2 =='SP'))* (20 - X)+ ((Field 1 == 'Y')AND(Field 2 =='MP'))* (30 - X)
    Can anyone kindly suggest what can be done in this case. Any suggestion would be of gr8 help to me.
    Thanks
    Palak Vyasa

    i think its alomost not possible what you are trying to achieve (no idea if there is a way)..
    but i have an idea..why don't you try out with restricted KeyFigures?
    Create two dummy RKFs and hide them.
    RKF1: combination of Field1=Y,Field2=SP,and any Base KF.
    RKF2: combination of Field1=Y,Field2=MP,and same Base KF.
    Then try this formula:
    (RKF1<>0)(20 - X)+(RKF2<>0)(30 - X)
    One of these RKFs must be zero always then only you get desired result..isnt it?
    as both RKFs are restricted by same KF and Same Field1 but different Field2,one them should be zero always.

  • Compare two characteristics in report

    HI,
    In Bex, I need to display report where two characteristics X and Y are equal. How to compare two characteristics in a report?Thanks

    Can you please give a example for whta you need exactly in report?
    Also chars are master data attr or loaded as transactional data?
    --S@A

  • Compare two characteristics!

    Hi Experts -
    I have read about this topic in this forum but I'm not making any progress. I need to compare the values of two characteristics (External Material Group and Bill-to-Party). If the values are the same, then I need to produce a report with that information and some key figures.
    In some other threads, it was suggested to use a formula variable.
    I have created two char value variables using replacement path to get the values of the two characteristics. Now how do I compare this in the formula variable? When I create a formula variable, all I see are the key figures and other formula variables.
    Can someone please help me through with this? Thanks a lot!

    Hi,after creating formula variables on two characteristics,are u getting values for both? create two new formulas to display formula variable values..and dont forget to place both chars in rows (in drill down) and hide them...
    formula 1 = formulavariable1
    formula 2 = formulavariable2
    compariosn  formula = (formula1 = formula2) * KF
    KF can be your KF or RKF...whatever it may be.
    if formula variables dont return any value,you have to find some other way..

  • Compare Two Characteristics in the report

    Hi All,
    I have a query, where I need to compare the 'Payment Terms'  opted by the customer (Master data) with Payment terms actually done in the transaction.
    So, I have Payment terms present in the InfoCube and also attribute of Customer Master.
    Now, I need a report to show only those records where Payment terms varies with the Payment terms in the Master data..
    Is this possible...?
    Things done:
    1. Searched SDN but could not get the solution..
    2. Checked with Formula Variables ..but in vein as we cannot pick charactieristics (of Data Type : Character string) with Formula Variables
    3. Virtual Characteristics : Not a fessible option due to performance concerns
    Regards, Vj

    Hi Vijay kumar Nandipati 
    Formula variable will work in u r case just create a new formula and there create a
    new formula variable it will allow u via replacement path of formula variable and
    then comapare that attribute value with the transactional keyfigure.
    Via boolean operation.
    Procedure:
    Just go to Key figure columns in the query designer right clik on it . Select new
    formula in the popup selct formula right click on it create new formula variable and
    then in the next screen select the processing type as replace ment path and give
    the char name and then in the next screen give the attribute value of char and then
    populate that value .under formula.
    Now select the new formula place original KF - this newly taken attribute value.
    it will show you the results.
    Regards
    R M K
    **Winners don't do different things, they do things differently**
    > Hi All,
    >
    > I have a query, where I need to compare the 'Payment
    > Terms'  opted by the customer (Master data) with
    > Payment terms actually done in the transaction.
    >
    > So, I have Payment terms present in the InfoCube and
    > also attribute of Customer Master.
    >
    > Now, I need a report to show only those records where
    > Payment terms varies with the Payment terms in the
    > Master data..
    >
    > Is this possible...?
    >
    > Things done:
    >
    > 1. Searched SDN but could not get the solution..
    >
    > 2. Checked with Formula Variables ..but in vein as we
    > cannot pick charactieristics (of Data Type :
    > Character string) with Formula Variables
    >
    > 3. Virtual Characteristics : Not a fessible option
    > due to performance concerns
    >
    > Regards, Vj

  • Compare two fields in bex

    Hi Experts,
    I want to compare two characteristics in bex. Is it possible to do in BEx ? If yes, how can i do it.
    If char A is equal to char B, display value of this key figure other wise display value of this key figure.

    Hi
    try this out:
    1) create 2 variables with Processing Type : Replacement Path and select the charc required.
    2) create 2 formula key figs. taking values from 2 diff. variables.
    3) include the variables into the formula key figs. created above respct. and the compare them.
    Hope it will resolve ur issue.
    Thanks,
    Jitender
    Edited by: Jitenderkumar Danduvia on Mar 13, 2010 7:49 AM

  • Query to compare two different periods

    hello, I want to compare two different periods and put together following query and wondering if this is the right way to do it:
    WITH  MEMBER  [TotalForThePeriod] AS
     SUM( {[Date].[Calendar].[Date].&[20070101]:[Date].[Calendar].[Date].&[20070228]}
          , [Measures].[Internet Sales Amount]
    MEMBER  [ThisMonth] AS
     SUM( {[Date].[Calendar].[Date].&[20070101]:[Date].[Calendar].[Date].&[20070131]}
          , [Measures].[Internet Sales Amount]
    MEMBER  [NextMonth] AS
     SUM( {[Date].[Calendar].[Date].&[20070201]:[Date].[Calendar].[Date].&[20070228]}
          , [Measures].[Internet Sales Amount]
    MEMBER [TotalForTherPeriod2] AS
       [ThisMonth] + [NextMonth]
    SELECT 
     [Product].[Category].[Category],
    //  [Measures].[Internet Sales Amount],
    //  [Measures].[Internet Order Quantity]
      [TotalForThePeriod],
      [ThisMonth],
      [NextMonth],
      [TotalForTherPeriod2]
    ) ON COLUMNS
      [Sales Territory].[Sales Territory Country].Members
    }  ON ROWS
    FROM [Adventure Works] 
    mark it as answer if it answered your question :)

    Hi Parry2k,
    According to your description, you want to compare the sales of two different periods. Right?
    Based on your query, both the Period1 and Period2 are from 20070101 to 20070228. They are same period, so it supposed to return same sales value on that two columns. Your query is right to me.
    If you have any question, please feel free to ask.
    Simon Hou
    TechNet Community Support

  • Query comparing two version

    Hi ,
    I have a small query comparing two vesions in java . my version like
    *1st one Version Name : swv-ora-tes-4.5*
    *2nd one Version Name :swv-ora-tes-4.6*
    How can we compare this version and 2nd one is latest version
    Regards
    Pattanaik

    Here's something you would have found by yourself in about 15 seconds if you'd bothered to do any work:
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#compareTo(java.lang.String)

  • Query Based on two Characteristics

    Hi,
    I want to build a query on a multiprovider that has two characteristics :
    ZCYFLAG (posted values 'Y' or 'N')
    ZPYFLAG (posted values 'Y' or 'N')
    The query must must be restricted for ZCYFLAG = 'Y'  or ZPYFLAG = 'Y'.
    (If I drag drop these characteristics in global restricstons and specify ZCYFLAG = 'Y'  , ZPYFLAG = 'Y'  , the query takes only AND values ).
    Is there a possible work around?
    Pointers will be of immense help.
    Thanks & Regards,
    Rahul R Nair

    Hi,
    If you put in Global it applicable to entire Query.
    So You have to create 4 Selections with the restriction of the following condition in each selection.
    1. ZCYFLAG Restrict with 'Y' ZPYFLAG restrict with 'Y'.
    2. ZCYFLAG Restrict with 'Y' ZPYFLAG restrict with 'N'.
    3. ZCYFLAG Restrict with 'N' ZPYFLAG restrict with 'Y'.
    4. ZCYFLAG Restrict with 'N' ZPYFLAG restrict with 'N'.
    After this create one formula for these restrictions and use condition OR in between these Restriction variables at any time only one restriction condition will be satisyfyed.
    Regards,
    Shiva.
    Edited by: Shivu  Kumar on Sep 15, 2009 3:38 PM

  • How to compare two amount colomns in the query ?

    Hi,
    I need to compare two amount colomns in the query and based on that i need to change the color of the colomn
    Is it possible by using exceptions.if yes please tell me how to do it.
    Regards
    Ansari

    Hi,
    you can give this a try:
    1) Create a formula keyfigure (Keyfigure A> Keyfigure B)* 1+(Keyfigure A< Keyfigure B)* 0, so here you get value as either 0 or 1,
    2) Hide this Formula Keygiure for display in the report, and create a exception on this Formula keyfigure for its value 0 or 1 with the desired colors.
    3) While defining the exception on the 3rd tab we get the option to specify the Columns for implication of this exception, their you can specify the desired 2 Keyfigures to be highlighted with the colors.
    Hope this helps ..
    Regards,
    Umesh.

  • How to compare two different characteristics at the same time in polestar

    Hi Gurus,
    I would like to analyse the e fashion universe in polestar with comparison of previous year product line with current year product line at the same time.
    is there any way to do that we can compare two years of the product line sales revenue at the same time with comparison chart like 2003 T shirts vs 2002 T shirts 
    in polestar we can compare the two measures at the same time but i want to compare the sales revenue of product lines of two years in a comparison chart at the same time.
    Regards and thanks
    Abid Paul

    Hi Stratos,
    I am actually able to compare the Measures  but i want the comparison between the two different characteristics like this year  productline  vs last year productline at the same time with say one measure like sales revenue or any other.
    Is it possible to compare the both and it should represent in the chart as well at the same time.
    In the polestar i can compare three measures at the same time but i want to compare characteristics like year  2009 productline VS 2008 productline with one measure say sales revenue.
    I would really appreciate if you could help me out.
    Regards and thanks
    Abid

  • Functinality to compare two material price with reference to BOM in CO

    Hi All,
    Is there is any functionality in Controlling which can compare the costing for two FERT materials.
    or
    is there is  any functionality where we can compare two material price with reference to BOM in controlling
    Please help me to compare the material price with reference to BOM
    Regards
    nandu

    Hi,
    You can use this report to compare two itemizations. The report compares the characteristics item number, item category, cost element, resource, material, cost center, plant/work center, cost center/activity type, operation number, BOM item, assembly indicator, and cost component.
    You can access this report as follows:
    Accounting ® Controlling ® Product Cost Controlling ® Product Cost Planning ® Material Costing ® Cost Estimate with Quantity Structure or Cost Estimate Without Quantity Structure ® Compare
    or
    Accounting ® Controlling ® Product Cost Controlling ® Product Cost Planning ® Information System ® Object Comparisons ® For Material ® Itemization Comparison.
    For Detail Please reffer following link:
    http://help.sap.com/saphelp_46c/helpdata/en/56/abd108f1a611d28a950000e8214595/content.htm
    Thanks and Regards
    Binoj M D

  • Report Painter - Display two characteristics on one line in lead column

    I have a requirement to produce a Report Painter report to display values by Cost Centre and Cost Element.
    The requesting user wants to see the Cost Centre AND Cost Element keys displayed on each row of the report, to allow for manipulation in Excel.
    I have no problem grouping Cost Element within Cost Centre or vice-versa, but am not aware of any way of displaying both key values on each row in the lead column (or anywhere else).
    Has anybody done this?

    Hi Robin,
    the request is not unusual. However, report painter does not allow for two key columns or a key column combining two characteristics. You might consider using SAP Query (with table COEP or COSS/COSP for aggregates) if you do not want to resort to developing the report in ABAP.
    Regards
    Nikolas

  • Compare two collection in sharepoint

    Hii
    I want to Compare to collection in sharepoint
    example:
    Collection 1: "A","B","C"
    Collection 2:"A","B","D","E"
    Result should be: "C"
    Like in C#  List<string> result = list1.Except(list2).ToList();
    I am new to programming Please help me..
    regards 
    sudeep

    http://stackoverflow.com/questions/3407356/comparing-two-collections
    check this example code below
    class CompareLists
    static void Main()
    // Create the IEnumerable data sources.
    string[] names1 = System.IO.File.ReadAllLines(@"../../../names1.txt");
    string[] names2 = System.IO.File.ReadAllLines(@"../../../names2.txt");
    // Create the query. Note that method syntax must be used here.
    IEnumerable<string> differenceQuery =
    names1.Except(names2);
    // Execute the query.
    Console.WriteLine("The following lines are in names1.txt but not names2.txt");
    foreach (string s in differenceQuery)
    Console.WriteLine(s);
    // Keep the console window open in debug mode.
    Console.WriteLine("Press any key to exit");
    Console.ReadKey();
    /* Output:
    The following lines are in names1.txt but not names2.txt
    Potra, Cristina
    Noriega, Fabricio
    Aw, Kam Foo
    Toyoshima, Tim
    Guy, Wey Yuan
    Garcia, Debra
    http://msdn.microsoft.com/en-us/library/bb397894.aspx
    Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
    INSQLSERVER.COM
    Mohammad Nizamuddin

  • Compare two rows in same table

    Hi,
    I want to compare two rows (some columns) in the same table, and if the data in the data columns is different, I want to pick the latest one. The table is date tracked. For instance I have an address table with different addresses for an employee with effective date. I want to be able to pick the latest row if the postal code is different for the 2 rows. Is this possible in sql. I can do this in Pl/sql, but dont want to use it. Eg
    address_id, postal_code, person_id,last_update_date
    123, pn123,1,12-JAN-01
    124,pu124,1,13-JAN-01
    I want to be able to retrieve just the second line.
    Any help is appreciated

    Welcome to the forum!
    Whenever you post please provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    >
    The table is date tracked. For instance I have an address table with different addresses for an employee with effective date. I want to be able to pick the latest row if the postal code is different for the 2 rows.
    >
    Your question is a little confusing because you are using terms like 'date tracked' and 'effective date' without explaining exactly what your definitions of those terms is.
    Why do you want the latest record ONLY if the postal code is different? What if the address is different? Then which record do you want?
    Why not just take the record for each person/company that has the latest date? If the data is the same then it doesn't which record you get so the one with the latest date will do. And if the data is different taking the one with the latest date gives you the latest data.
    The classic definition of effective date is 'the date the information becomes effective'. Information with a given effective date is NOT in effect before that date and is SUPERCEDED when data is entered with a later effective date if the actual date is later than or equal to the effective date. Using your data
    >
    123, pn123,1,12-JAN-01
    124,pu124,1,13-JAN-01
    >
    The first record IS NOT effective for dates prior to 12-JAN-01. In fact for a query looking for data prior to that date there isn't any data.
    The first record is also NOT effective for dates on or after 13-JAN-01. Only the second record is effective.
    If you added a record for 14-JAN-01 this record would not be effective until on or after that date (i.e. not for another 4 1/2 months).
    So for the classic definition of effective date the query needs to provide the AS OF date to use to obtain the data. If, as in your system, you are not allowed to create records with dates in the future and you just want the latest record then you can just select the record with the MAX(myDate) value for the given person_id, address_id or whatever your key values are.
    Edited by: rp0428 on Aug 11, 2012 7:50 AM

Maybe you are looking for

  • How to deinstall Oracle Developer 6.0

    Dear Pro. I wondered how to deinstall Oracle Developer 6.0 from Windows 2000. although i tried using Developer 6.0 CD to deinstalled the products, but after i clicked the remove button. whole windows is gone. using Oracle 8 CD doesn't work too. could

  • LSMW - create Scheduling Agreement for subcontracting position type

    Hi all, I want to use LSMW to create a scheduling agreement with position type L (subcontracting). I'm using Business Object Method BAPI with Business Object      BUS2013      Method               CREATE Message Type         PURSAG_CREATE Basic Type 

  • How to INSTALL SAP ECC 6 EHP 4 IN SUSE 11

    HELLO EXPERTS INITIALLY WE HAVE SAP ECC 6 EHP 4 FOR SUSE 10 SP2. ALL THING ARE GOING WELL. BUT NOW WE ARE MOVING TOWARD TO UPGRADE HARDWARE AS WELL AS OPERATING SYSTEM. SO  WE ARE GOING TO UPGRADE EXISTING SAP ECC6 EHP4 INSTALLATION IN SUSE 11. SUSE

  • How would you push login credentials to a landing page?

    I am looking into a solution for pushing a user's login credentials to a landing page with options for different sites to go to. Basically the user will sign in and then be redirected to a landing page with three buttons that the user will choose whi

  • Error message when displaying webhelp

    We have created webhelp in Robohelp 7 and placed the generated help on a server. We have created a customized browser window to display the context sensitive help online when it is accessed from the application. When a user accesses this help for the