How to find make most common value?

Hello,
I have data like this
Customer Invoice number payment term
ABC 10001 K20
ABC 10002 K40
ABC 10003 K20
ZYX 10004 K30
ZYX 10005 K20
ZYX 10006 K30
Now I want to make report which will show most common payment term. I tried with count etc. with no result.
I want report like this
ABC K20
ZYX K30
Regards,
Luko

Hi,
You can set the GROUP BY clause in the Advanced Tab
http://gerardnico.com/wiki/dat/obiee/group_by
Please refer the below links,
Group By in OBIEE
Or,
count(customet by customer,payment term) (or) you can apply those columns in Advanced tab then apply below filter in your report.
Apply fiter >grather than 1
Hope this help's
Thanks,
Satya

Similar Messages

  • How would I find the most common value every nth row in a column

    SCENARIO 1
    I have a column with a series of numbers in c1:c1000 as follows:
    2
    2
    3
    1
    1
    4
    2
    3
    1
    2...
    and I would like to find the most common value for every nth (in this case, second) row.
    SCENARIO 2
    Originally, I created a separate column in J and used this to find a value of 0 or 1 via a filter to label the rows odd or even. I was then going to create two separate columns, one for even rows of data and another for odd rows of data to separate them and perform functions on each column. But I do not know how to copy just the filtered data to one of the new columns to apply the MODE function (or any other for that matter).
    Perhaps my question should be: after applying a filter, how do i copy just the visible filtered data of every nth row to a new column in my spreadsheet while retaining the original column with all rows of data? 
    BACK TO SCENARIO 1
    If I do not need to go through this effort, I would just apply the MODE function (or AVERAGE or SUM) to every nth row in the original data column.

    Since Index and Offset were already taken, I used INDIRECT(ADDRESS()) in my example.
    Here's how I approached it:
    Expressions are as follows...
    Data Subset, Column A, Row 2: =IF(StartingRow :: A, 1, NSelector :: $A)
    Subsequent rows in Column A: =IF(ROW()<COUNT(Input :: $B)/NSelector :: A:$A+2, A2+NSelector :: $A, "")
    Data Subset, Column B, Rows 3
    throuth the last: =IFERROR(INDIRECT(ADDRESS(A+1, 2, ,,"Input")), "")
    Stats, Column A, Row 2: =IFERROR(MODE(Data Subset :: B), "No Mode")
    Stats, Column B, Row 2: =COUNTIF(Data Subset :: B, A)
    Lots of ways to skin this cat.
    Jerry

  • Finding the most common value in an array of enums

    Hello,
    I'm looking for an elegant way of finding the most common value in an array of enums
    My enum being:
    0 - Close
    1 - Open
    2 - Undefined
    For instance, if my array contains:
    Close, Close, Open, Close, Close, Open.
    The most common value would be "Close"
    I have created a very customized VI that allows me to obtain the desired result, but I'm really not proud of doing it this way, simply because I would have to modify it if I were to add a new value to my enum...
    If someone can share some ideas to enlighten me, I would REALLY appreciate it.
    Thanks in advance!
    Jorge
    Solved!
    Go to Solution.

    Here is the variant using the search method. This method will run N-1 times where N is the number of ENUM elements. Yes, it is a bit more complex than the brute force method but it would execute fairly quickly. The sort would probably be the time consuming task.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot
    Attachments:
    ENUM Counter.vi ‏14 KB
    Enum.ctl ‏4 KB

  • How to find the most matched values in the set of map?

    Hi friends!
    I have two vectors
    vector<int> V1; vector<int> V2;
    and a map<int, set<int>> M1;
    I want to select common values from both V1 and V2 and check those values with the set in the map M1.
    For example:
    V1 contains;
    2  4  6  8  9
    V2 contains;
    4  5  6  9  10 
    M1 contains;
    1=>1  2  5  9
    2=>4
    3=>5   10
    4=>2  4  8
    5=>4   9
    6=>4   6
    7=>9  12
    When we select the common values of V1 and V2 it is 4, 6, 9.
    And we search for all 4, 6, 9 from the values of M1 which give more appropriate.
    But, no all values in the set of map.
    Then, we delete any value from 4, 6, 9, then remaining values would match any values from the map.
    From the example, if we delete 6, then remaining 4, 9 will match with 5=>4  9, or if we delete 9, then 6=>4   6. Any one of the keys can be selected.
    I know how to select the common values from V1 and V2, but I do not know how to match with the values and select the appropriate key from M1.
    Could anyone help me to solve this?

    This is not the question you asked, except perhaps in the subject. The subject is not the right place to put key features of the question. It is also important to use the body to ask just the question you want
    answered. For example your real question has nothing to do with V1 and V2, just the common vector V (e.g. 4 6 9).
    One way to solve your problem would be to create a new map
    map<int, set<int>> M2;
    with the same keys as M1. Each set of M2 should contain the elements of V that are
    not in the corresponding set of M1.
    Then pick the key of M2 that has the smallest set. If that set is empty, then the whole of V can be used. Otherwise the smallest set tells which elements of V have to be removed, and which is the desired key of M1.
    In your example, key 5 of M2 will contain just 6, so you should remove 6 from V and select key 5.
    Yes fine. I tried the following code and it creates the map M2 (NewMyMap in my code). But how to find the smallest set starting from size 1?
    #include <vector>
    #include <algorithm>
    #include <iostream>
    #include <map>
    #include <set>
    using namespace std;
    typedef vector<int> IntVec;
    typedef set<int> IntSet;
    typedef map<int, IntSet> SetMap;
    bool IsValueNotInSet(int value, IntSet& S);
    SetMap CreatNewSetMap();
    IntVec IVec; //This vector is for selecting certain keys from mySet map.
    IntVec myVec;
    SetMap mySet;
    SetMap NewMyMap;
    int main()
    IVec.push_back(3); IVec.push_back(4); IVec.push_back(5); IVec.push_back(6);
    myVec.push_back(4); myVec.push_back(6); myVec.push_back(9);
    IntSet tempS;
    tempS.insert(1); tempS.insert(2); tempS.insert(5); tempS.insert(9);
    mySet.insert(make_pair(1,tempS));
    tempS.clear();
    tempS.insert(4);
    mySet.insert(make_pair(2,tempS));
    tempS.clear();
    tempS.insert(5); tempS.insert(10);
    mySet.insert(make_pair(3,tempS));
    tempS.clear();
    tempS.insert(2); tempS.insert(4); tempS.insert(8);
    mySet.insert(make_pair(4,tempS));
    tempS.clear();
    tempS.insert(4); tempS.insert(9);
    mySet.insert(make_pair(5,tempS));
    tempS.clear();
    tempS.insert(4); tempS.insert(6);
    mySet.insert(make_pair(6,tempS));
    tempS.clear();
    tempS.insert(9); tempS.insert(12);
    mySet.insert(make_pair(7,tempS));
    cout<<"MYVEC\n";
    cout<<"-------------\n";
    for(IntVec::iterator itv = myVec.begin(); itv != myVec.end(); ++itv)
    cout<<(*itv)<<" ";
    cout<<"\n\n";
    cout<<"\nMYSET\n";
    cout<<"-------------";
    for(map<int,set<int>>::iterator its = mySet.begin(); its != mySet.end(); ++its)
    cout << endl << its->first <<" =>";
    for(IntSet::iterator sit=its->second.begin();sit!=its->second.end();++sit)
    cout<<" "<<(*sit);
    cout<<"\n\n";
    NewMyMap= CreatNewSetMap();
    cout<<"\nNEWMYSET\n";
    cout<<"-------------";
    for(map<int,set<int>>::iterator its1 = NewMyMap.begin(); its1 != NewMyMap.end(); ++its1)
    cout << endl << its1->first <<" =>";
    for(IntSet::iterator sit=its1->second.begin();sit!=its1->second.end();++sit)
    cout<<" "<<(*sit);
    cout<<"\n\n";
    return 0;
    bool IsValueNotInSet(int value, IntSet& S)
    IntSet::iterator it=find (S.begin(), S.end(), value);
    if (it!=S.end())
    return false;
    return true;
    SetMap CreatNewSetMap()
    IntSet TSet;
    for(IntVec::iterator it = IVec.begin(); it != IVec.end(); ++it)
    SetMap::iterator its = mySet.find(*it);
    if (its != mySet.end())
    TSet.clear();
    int key = its->first;
    IntSet& itset = its->second;
    for(IntVec::iterator itv = myVec.begin(); itv != myVec.end(); ++itv)
    if(IsValueNotInSet((*itv), itset))
    TSet.insert(*itv);
    NewMyMap.insert(make_pair(key,TSet));
    return NewMyMap;

  • How To Find Opening Stock And Value For a Material

    Hi Experts,
    How To Find Opening Stock And Value For a Material  in Given Dates
    Moderator Message: Search.
    Edited by: kishan P on Sep 15, 2010 4:05 PM

    Thanks For Answering.....
    But I Need Any Function Module To Get Opening Stock And Value For Given Material With in Dates.

  • How to find out the common things between two rpds?

    How to find out the common things between two rpds? And place the common things in a common RPD.

    I thought of one solution.
    Original RPD = A
    Modified RPD = B
    XML Patch created for A-B = X
    Now open the XML Patch in IE or Mozilla and delete the columns/tables/variable/etc,. from the Original RPD A.
    But its a cumbersome process, if the XML file is of very less size its Ok. If its 10-20 MB then going line by line and deleting the change is not the process to be followed.
    I have to check whether its just the delete or modify or drop.
    Let me know your thoughts.

  • How to find if COLUMN DEFAULT VALUE is stored as metadata?

    Hello,
    I'm using Oracle 11g enhanced ADD COLUMN Functionality. Adding new columns with DEFAULT values and NOT NULL constraint no longer requires the default value to be stored in all existing records.
    Sometimes we change DB columns from NOT NULL with DEFAULT to NULL with DEFAULT. This operation "materialize" column default.
    Is there an easy way (Dictionary view) how to find, that COLUMN default value is stored as metadata or is "materialized" ?
    Thanks. Filip
    Oracle RDBMS version : Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

    Thanks for your suggestion, but it is not what i'm looking for :-(
    I don't need to find the default value, i need to know how is default value stored. It could be stored in 2 ways.
    1. "materialized" - prior to 11G (value is physicaly stored for every column)
    2. "as a metadata" - new 11G functionality (default is not physicaly stored and if you query the column DB transalte NULL value to defaut value)
    Now I would like to now if my column is type 1) or 2). How can I do it?
    Thank you.Filip

  • How can I make "F5" key value to System

    subject : How can I make "F5" key value to System
    I like to refresh web page automatically.
    so I have to input "F5" key value of keyboard to local system.
    How can I do this job ?

    Thank you so much !
    I solved the problem thanks to your advice .
    Thank you again~

  • How do I search for common values across multiple columns?

    I am coordinating a schedule with 5 people across hundreds of dates, and have columns A-E filled with many rows of dates. How can I make a new column that displays all the dates (values) that each person (column) has in common with all the others?
    Is there a simple formula for this?
    thanks!

    Scarampella,
    A second table can be used to find your matching dates.
    Here's an example:
    The formula in Matching Dates is:
    =IF(ISERROR(MATCH(A,Table 1 :: A, 0)+MATCH(A,Table 1 :: B, 0)+MATCH(A,Table 1 :: C, 0)+MATCH(A,Table 1 :: D, 0)+MATCH(A,Table 1 :: E, 0)), "", A)
    Basically, I look for matches in each person's list of dates, and if any fail to produce a match with the date being examined, the result is a miss, and if all match, it's a hit. You can sort the result to get a short list of matches without spaces.
    Regards,
    Jerry

  • How to find first non zero value from the numeric value or string?

    Hiii, Every body
              I have one numeric indicator in which some valuse is coming with the decimal value, lets say 0.00013, now i want to find the first non-zero value from this numeric indicator, then what should i do to do so? i have converted it in the string, but i could not find any method to find first non-zero value from that string or either from the numeric indicator????
          Can you please help me, how to do it? i have attached the vi and write all the description inside.
    Thanks in Advance,
    Nisahnt
    Attachments:
    Find first nonzero.vi ‏20 KB

    Just convert it to an exponential string and take the first character .
    Message Edited by altenbach on 05-10-2006 08:00 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    FisrstNonzeroChar.png ‏3 KB
    FindFirstNonzeroCharacter.vi ‏20 KB

  • How to find out Particular column value in DB

    Hi All,
    I have to find out Particular column value in DB .can U tell me the Query for that.

    There is one way:
    Re: How to write the Query

  • How to find batches from characteristics value

    Dear Team
    How to find no. of batches from characteristic value used in that batch class?
    B.R.
    Ramesh kumar

    Hi Ramesh,
    Please try with BMBC.
    For characteristics value you can set it from customizing->Batch where used list.
    Regards,
    Krishnendu.

  • How to find out the ASCII Values for Spanish character

    Hi,
    I had an requirement to store Spanish character and also need to fileter the records based on the Spanish character.
    Kindly guide me for below.
    To filter the Records which contains spanish characters?
    To get the ASCII Values for the particular column?
    E.g. we can find out the ASCII value of 'a' by using the syntax select ASCII('a') from dual.
    But I want to find the ASCII Values for the particular column value. Ie. name.
    E.g., Client name is "Suresh", I want to the ASCII Values for entire name of "Suresh".
    Kindly do the needful help / Guidance on this.
    Thanks,
    Orahar

    To expand on what I said in my first post, you want to do something along these lines:
    with t (thename) as
      select 'Suresh' from dual
    select thename
         , substr(TheName, level, 1)
         , ascii(substr(thename, level))
      from t
    connect by level <= length(thename);The output of the above query is:
    THENAM S ASCII(SUBSTR(THENAME,LEVEL))
    Suresh S                           83
    Suresh u                          117
    Suresh r                          114
    Suresh e                          101
    Suresh s                          115
    Suresh h                          104
    6 rows selected.Note that the WITH statement is only there to simulate a table for this example. With a table, all you do is get rid of the with and substitute the name "t" for the name of your table (also the name of the column to whatever name the column has in your table).
    Lastly, I suggest you post your question along with, an example table and the output you'd like to get in the PL/SQL forum. There are people there that will give you all kinds of great ways of solving that problem.
    HTH,
    John.

  • How to find the last string value in dynamic object?

    Hi All,
    I am trying to find the last string value in dyanamic objects,Any one have solution for this.
    Ex:
    my data :12347-ebjdone-525-ecgfjf-25236-defdafgdeg
    And i want to show the output is :defdafgdeg
    Any ideas:
    Thanks
    Srini

    For oracle try using oracle function.
    e.g.
    SELECT  reverse(substr(reverse('12347-ebjdone-525-ecgfjf-25236-defdafgdeg'),1,instr(reverse('12347-ebjdone-525-ecgfjf-25236-defdafgdeg'),'-','1'))) from dual
    Object definition might look like:
    reverse(substr(reverse({ObjectName}),1,instr(reverse({ObjectsName}),'-','1')))
    Regards,
    Kuldeep
    Edited by: Kuldeep Chitrakar on Feb 12, 2010 8:12 AM

  • How to find out where a value is stored

    Hi,
    i entered something in HR Area infotyp 0031, i expected to find those entries in table pa0031, but this table remains empty. How can i find out where sap stores those values?

    press F1 on the field where u typed the value. click on technical info and get the table and field name.
    in most cases it might be structure. either way, go to se11 and type the table/structure name and then search for the field name in that table.
    then dbl click on the data element and click on the where-used button.
    now select table entries and start looking for all the tables where the field is present. go to each table and check for the number of table entries and see if the value u entered has been caputred in that table or not.
    hope that helps.
    else u can revert back
    regards,
    pk

Maybe you are looking for

  • Acrobat won't convert documents

    I have been using Acrobat 8 Professional for a number of months with no problems.  Then in April we were going on vacation and wanted to do work from our laptop, so I installed Acrobat on the laptop.  On vacation the laptop completely crashed and say

  • I want to change my e mail adress, but it says that this e mail adress is used for rescuing mails and cannot be use as apple id. How can I change that?

    When I want to change my e mail adress, the follow sentence arise: This email adress is designated as your rescue email adress and cannot be used as your apple ID. I had another mail adress, but from today, I have just this one so it's necessary that

  • Canon 30D, Raw?

    New with Aperture. When I shoot Raw or Raw+JPEG I don't see previews in the import view of Aperture. When I shoot only JPEG I do. Any ideas on how to shoot in RAW but get a preview so I can import only what is needed? Thanks G5   Mac OS X (10.4.7)  

  • Email stops downloading messages

    Every day my mail client stops downloading email. When it tries to open an email, the wait circle is there indefinitely. New mail is not pushed or fetched. I have Exchange isync in push mode and an IMAP account in fetch mode. I have to reboot the iph

  • Airport express and new macbook pro

    my daughter has just purchased a new macbook pro and we have set up the airport express. her macbook tells her that she is connected to the airport express but she can not load safari.