Ranking in Answers

Hi,
report1 has project_name, project_start_date, project_stages, project_start_date_rank(rank(project_start_date by project_name). Filter has project_start_date_rank = 1.
report2 has the same values with an additional field project_name, project_start_date, project_stages, project_start_date_rank(rank(project_start_date by project_name), project_cost. Filter has project_start_date_rank =1 and project_name is prompted.
I have to pass project_name from report1 to report2. In report2 I have project_name as prompted, the problem is, it is first filtering it by the passed project_name and then ranking it, how can I first rank it and then filter it?
Thanks for your time and help.

Get the ranking done in the RPD itself by use of this expression,
CAST(EVALUATE('RANK() OVER (PARTITION BY %1,%2)', logical_table.ROWID) AS FLOAT)

Similar Messages

  • Enable Diagnostics for WebLogic Startup

    Hi
    I am using the Integrated WLS within JDeveloper Studio 11.1.1.5.
    I am trying to diagnose a problem where the WLS is deploying an application at startup that is failing. I would like to get low level diagnostics during startup to enable me to debug the problem. Currently I am only seeing the stack that throws the error which is not sufficient.
    Currently only 'Warning' and 'Notice' level statements are being written to the log files/console.
    I have tried the following none of which have affected the level of messages displayed in the log files/console:
    1) Add additional debugging Java options to the ADF Fusion Applications project I am starting the WLS from under 'Project Properties --> Run/Debug/Profile --> Launch Settings --> Java Options'. I have tried adding various WLS debug switches which have had no effect i.e. '-Dweblogic.debug.DebugDeployment=true -Dweblogic.debug.DebugDeploy=true'
    2) Add debugging Java options above to Integrated WLS Launch Settings under 'Application Server Properties --> Launch Settings --> Java Options'.
    3) Added debugging Java options above directly to startWebLogic.cmd script.
    4) Enable all weblogic debug flags from the WLS console under 'Summary of Servers >DefaultServer >Summary of Servers >DefaultServer>Debug'.
    5) Changed WLS startup scripts to enable environment variable 'debugFlag'. This results in the JAVA_DEBUG variable being set to '-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=%DEBUG_PORT%,server=y,suspend=n -Djava.compiler=NONE'.
    5) Set the log level to FINEST for all 'weblogic*' classes in the Oracle Diagnostic Logging Configuration.
    Surely there's a simple way of getting more diagnostics out of WebLogic during the startup phase?
    Any assistance greatly appreciated.
    Thanks

    Hi,
    It seems you did lot of things here but missed to make server logging in debug mode. As you have already enabled debuggers from admin console now go to servers > logging and change server logging to debug for all. This will help print the debug statements too.
    For diagnostic you can enable it from admin console, but remember logging will be done in WLDF archive files that can be read using WLST only using WLST command - exportDiagnosticDataFromServer.
    ## rank the answer if it is helpful.. ;) ##
    Thanks,
    Ranjan
    Edited by: Ranjan K on Apr 12, 2013 5:59 AM

  • Vlan over wireless bridge with internet sharing?

    Hi Community, my first post here, hoping somebody may be able to advise...
    I live on a farm which is too far for broadband but fortunately I also have an office in a nearby town and because I have line of sight I have setup a wireless bridge, this gives me 8 MBits which is wonderful. Some of my equipment, for example a NAS is on the farm, and I need to access them from the office via the wireless link and I occasinally use vnc to access my office desktop from the farm. This all works beautifully.
    Ok. now I want to share my internet with my neighbor on the farm, who, in a strange twist also rents an office next to mine downtown, so I would like to give him access to the internet and to his equipment he has there too.. but I don't want him to be able to access my equipment and visa versa I don't want to see his stuff...
    This sounds like a job for port based VLAN.. and so what I bought is two Linksys/Cisco SLM2005 layer2 switches in the hope that this would allow me to do what I want... but I'm not so sure now. In the office I use a draytek v2910 which has a vlan feature that allows me to separate the ports from each other, only giving them internet access.
    So... if I connect these two switches to each other, and I create a VLAN with the same id on each of the switches, will the corresponding vlans be shared, so, if you assume the following hardware setup:
    farm: slm2005 switch
    port 1 -> wireless bridge to office: member of vlan "2", "3"
    port 2 -> access point A for neighbor: member of vlan "2"
    port 3 -> my own access point B: member of vlan "3"
    office: slm2005 switch
    port 1 -> wireless bridge to farm: member of vlan "2", "3"
    port 2  -> access point C for neighbor: member of vlan "2"
    port 3 -> my access point for office D: member of vlan "3"
    port 4 -> router port 1: member of vlan "2"
    port 5 -> router port 2: member of vlan "3"
    the router (draytek v2910) is configured in such a way to separate port 1 and port 2 (otherwise there would be a loop...)
    The idea here is to create a vlan "2" for my neighbor and "3" for myself. but what's the correct way to consider the wireless bridge inbeetween (in fact, I think the same problem would occur if I just connected the two switches with a cable (if i had a 2 mile long one..)...)
    Will my neighbor be able to see both access points "A" and "C" and the internet, but not be my access points "B" and "D"? Or does this whole concept of VLAN over bridge not work like this, or not at all?
    Thanks in advance for any advice,
    Andres

    Hi Andreas,
    you're not far from it.
    Your whole concept is ok. What you just need is on the gateway of each subnet (I would presume it's the router in the office) to create an access list preventing to route between vlan 2 and 3.
    On all other devices,  traffic can't jump between vlans. But on a routing device that has the Vlan layer3 interfaces, traffic is routed between vlans so that's where you need to prevent it.
    With regards to vlans over wireless, you're also having the good concept. The point is to have only 1 ssid, that will be in a certain vlan, but also bridging the other vlans onto that ssid.
    This doc should help you out :
    http://www.cisco.com/en/US/partner/products/hw/wireless/ps4570/products_configuration_example09186a00801d0815.shtml#vlanbr
    HTH,
    Nicolas
    Thanks to rank the answer if you see it as useful !

  • Rank function in Answers

    Hi,
    I have to produce a bar-chart with Number of Projects(Y axis), Project Phase(X axis). For example, x axis should have labels like Phase-1, Phase-2 etc., and in each phase teh number of projects should be the bar. The catch is , the number of projects should be counted only in the phase where the "Recorded_date" is max.
    In the data base, I can use something similar to this
    select * from (
    SELECT project_id, phase_id, recorded_date,
    ROW_NUMBER() OVER (PARTITION BY project_id ORDER BY recorded_date desc) as rnk
    from MAIN.project_detail) a
    where rnk=1;
    How to implement this? Please let me know if there is an alternate way. I do not want to make changes to the RPD, if I can accomplish this in Answers.
    Thank you for your time and help.

    So in your case,
    select * from (
    SELECT project_id, phase_id, recorded_date,
    ROW_NUMBER() OVER (PARTITION BY project_id ORDER BY recorded_date desc) as rnk
    from MAIN.project_detail) a
    where rnk=1;
    would be implemented by the statement 'ROW_NUMBER() OVER (PARTITION BY project_id ORDER BY recorded_date desc) as rnk'
    getting transformed to,
    rank(recorded_date by project_id)
    in the column function(fx).

  • Error using Rank function in Answers

    Hi All,
    Am trying to generate a report in Answers which lists Top Accounts with Revenue.
    I Ranked the Revenue field and it is returning me correct values. ( Rank(account.revenue) )
    But, when I try to filter on this field and restrict the rows which shows only top 10 Accounts, it is returning the following error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1792, message: ORA-01792: maximum number of columns in a table or view is 1000 at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
    Can any one help me on this.
    Thanks in Advance,
    Imtiaz.

    Hi Joe,
    This is the Physical query generated when I use Rank function and the report is fine.
    select distinct D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    D1.c6 as c6,
    D1.c7 as c7,
    D1.c8 as c8,
    D1.c9 as c9,
    D1.c10 as c10,
    D1.c11 as c11,
    D1.c12 as c12,
    D1.c13 as c13,
    D1.c14 as c14,
    D1.c15 as c15
    from
    (select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    D1.c6 as c6,
    D1.c7 as c7,
    D1.c8 as c8,
    D1.c9 as c9,
    D1.c10 as c10,
    D1.c11 as c11,
    D1.c12 as c12,
    D1.c13 as c13,
    D1.c14 as c14,
    D1.c15 as c15
    from
    (select Case when D1.c1 is not null then Rank() OVER ( ORDER BY D1.c1 DESC NULLS LAST ) end as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c1 as c4,
    D1.c4 as c5,
    D1.c5 as c6,
    D1.c6 as c7,
    D1.c7 as c8,
    D1.c8 as c9,
    D1.c9 as c10,
    D1.c10 as c11,
    D1.c11 as c12,
    D1.c12 as c13,
    D1.c13 as c14,
    D1.c14 as c15,
    ROW_NUMBER() OVER (PARTITION BY D1.c1, D1.c2, D1.c3, D1.c4, D1.c5, D1.c6, D1.c7, D1.c8, D1.c9, D1.c10, D1.c11, D1.c12, D1.c13, D1.c14 ORDER BY D1.c1 ASC, D1.c2 ASC, D1.c3 ASC, D1.c4 ASC, D1.c5 ASC, D1.c6 ASC, D1.c7 ASC, D1.c8 ASC, D1.c9 ASC, D1.c10 ASC, D1.c11 ASC, D1.c12 ASC, D1.c13 ASC, D1.c14 ASC) as c16
    from
    (select distinct T690.SUM_REVN_AMT as c1,
    T690.NAME as c2,
    T2216.NAME as c3,
    T690.X_PETROFAC_REVN as c4,
    T690.SUM_WIN_PROB as c5,
    T690.X_PERCENT_GET as c6,
    T690.SUM_WIN_PROB * T690.X_PERCENT_GET / nullif( 100, 0) as c7,
    T690.X_EC_PRIORITY as c8,
    T19028.LOGIN as c9,
    T690.X_COUNTRY as c10,
    T690.X_REGION as c11,
    T18311.NAME as c12,
    T18641.NAME as c13,
    T18238.NAME as c14
    from
    SIEBEL.S_BU T18238 left outer join (
    SIEBEL.S_USER T19028 left outer join (
    SIEBEL.S_OPTY T690 left outer join SIEBEL.S_STG T2216 On T690.CURR_STG_ID = T2216.ROW_ID) left outer join SIEBEL.S_ORG_EXT T1189 On T690.PR_DEPT_OU_ID = T1189.ROW_ID) left outer join SIEBEL.S_ORG_EXT T18311 /* Competitor */ On T690.PR_CMPT_OU_ID = T18311.ROW_ID) left outer join SIEBEL.S_ORG_EXT T18641 /* Partner */ On T690.PR_PRTNR_ID = T18641.ROW_ID) left outer join SIEBEL.S_POSTN T19114 On T690.PR_POSTN_ID = T19114.PAR_ROW_ID) left outer join SIEBEL.S_OPTY_BU T18280 On T690.ROW_ID = T18280.OPTY_ID) left outer join SIEBEL.S_OPTY_X T19415 On T690.ROW_ID = T19415.PAR_ROW_ID) On T19028.PAR_ROW_ID = T19114.PR_EMP_ID) On T18238.ROW_ID = T18280.BU_ID
    ) D1
    ) D1
    where ( D1.c16 = 1 )
    ) D1
    order by c1 desc
    But When I apply Filter on this Rank column then it gives me the error. THis is the Physical query for that
    select distinct Case when D1.c1 is not null then Rank() OVER ( ORDER BY D1.c1 DESC NULLS LAST ) end as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c1 as c4,
    D1.c4 as c5,
    D1.c5 as c6,
    D1.c6 as c7,
    D1.c7 as c8,
    D1.c8 as c9,
    D1.c9 as c10,
    D1.c10 as c11,
    D1.c11 as c12,
    D1.c12 as c13,
    D1.c13 as c14,
    D1.c14 as c15
    from
    (select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    D1.c6 as c6,
    D1.c7 as c7,
    D1.c8 as c8,
    D1.c9 as c9,
    D1.c10 as c10,
    D1.c11 as c11,
    D1.c12 as c12,
    D1.c13 as c13,
    D1.c14 as c14
    from
    (select T690.SUM_REVN_AMT as c1,
    T690.NAME as c2,
    T2216.NAME as c3,
    T690.X_PETROFAC_REVN as c4,
    T690.SUM_WIN_PROB as c5,
    T690.X_PERCENT_GET as c6,
    T690.SUM_WIN_PROB * T690.X_PERCENT_GET / nullif( 100, 0) as c7,
    T690.X_EC_PRIORITY as c8,
    T19028.LOGIN as c9,
    T690.X_COUNTRY as c10,
    T690.X_REGION as c11,
    T18311.NAME as c12,
    T18641.NAME as c13,
    T18238.NAME as c14,
    Case when T690.SUM_REVN_AMT is not null then Rank() OVER ( ORDER BY T690.SUM_REVN_AMT DESC NULLS LAST ) end as c15
    from
    SIEBEL.S_BU T18238 left outer join (
    SIEBEL.S_USER T19028 left outer join (
    SIEBEL.S_OPTY T690 left outer join SIEBEL.S_STG T2216 On T690.CURR_STG_ID = T2216.ROW_ID) left outer join SIEBEL.S_ORG_EXT T1189 On T690.PR_DEPT_OU_ID = T1189.ROW_ID) left outer join SIEBEL.S_ORG_EXT T18311 /* Competitor */ On T690.PR_CMPT_OU_ID = T18311.ROW_ID) left outer join SIEBEL.S_ORG_EXT T18641 /* Partner */ On T690.PR_PRTNR_ID = T18641.ROW_ID) left outer join SIEBEL.S_POSTN T19114 On T690.PR_POSTN_ID = T19114.PAR_ROW_ID) left outer join SIEBEL.S_OPTY_BU T18280 On T690.ROW_ID = T18280.OPTY_ID) left outer join SIEBEL.S_OPTY_X T19415 On T690.ROW_ID = T19415.PAR_ROW_ID) On T19028.PAR_ROW_ID = T19114.PR_EMP_ID) On T18238.ROW_ID = T18280.BU_ID
    ) D1
    where ( D1.c15 <= 10 )
    ) D1
    order by c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15
    Thanks,
    Imtiaz

  • TopN and Rank in OBIEE-Answer

    Hi All,
    I'm an "OBIEE newbie" and not sure how to use the Topn or Rank function to achieve the desired resullt below.
    I have a report that will display the top 10 or 20 (or whaterver # entered by users) of hospitals that have highest # of patients and then a sum of patients from the rest of other hospitals. ex:
    Hospitals #patients rank
    ABC 1500 1
    KLM 1200 2
    DEF 1200 2
    XYZ 200 10
    Other hospistals:      5000
    The top 10 or 20 # will be used as a prompt.
    Your help is much appreciated !!!
    Thanks,
    Ty

    Hi David,
    I did follow John's posting (it's very helpful for a beginner) but I just could not figure out what he did in Pivot table to get the SUM of the one that did not make the top 10 list. If you could show me how to do that :)
    Thank you for help!
    Ty

  • Allow user to select up to 5 answers and enter a ranking

    Hello,
    I ahve a multi page form created with LiveCycle 10.0.2.201. On one page, there is a grid of goals presented to the user. There are 33 of these goals in 3 columns of 11.
    Here is a link to an image of the grid. (For some reason I cannot get the image to upload to this posting)
    http://i.imgur.com/TYM3JVY.jpg
    What I want to have happen is for the user to select up to 5 goals and those selections show the order of importance from 1 to 5.
    Any thoughts on how to accomplish this?
    Thanks!
    Joe
    ***Added: I suppose it would be necessary for some sort of warning to pop up if the user selected a) more than 5 and b) if they had made a selection twice.

    Try the LCD forum.

  • Dense Rank in OBIEE answers

    Hi All,
    Can any on let me know how to create a column in OBIEE answers  which gives the row number starting with 1 for each row  in the group. similarly for next group the row number should start with 1 and so on.
    Thanks in advance for your quick response!
    Regards

    This feature had appear in the 9i version, so there is no way to have it running with a 6i version. If you have a 9i database, you could write a database stored function/procedure that would use this analytic function, and return the lines to Forms.
    Francois

  • Problem with rank in OBIEE 11G

    Hi,
    I have a problem with the function rank in obiie, i have two columns the first is the id of employees, and the second is the rank of revenues of employees, when I filter one employee and the rank is always 1, someone can help me?
    Cumps

    I do not think this is going to be possible using a traditional filter on the query.
    In order for the rank function to correctly work, it has to be aware of the other column values in the query to assign a rank to each row. When you filter the query ( either on the ID or the Rank) all of the other column values will be FILTERED OUT of the query. Rank will only see 1 value in the column, so it gets the #1.
    You have 2 options here:
    Selection steps: use selection steps to "keep" only the rows you are interested in. Selection steps basically allow you to"hide" some of the rows your query has returned, but still calculate against them for aggregate functions. If you are focusing on a top or bottom % this solution will work well.
    If you are hell-bent on using a filter, the only way you will be able to get the rank function to work is to calculate the rank in a 2nd query, then use an outer join to attach the rank column onto your filtered employee query. 

  • F110- Automatic Payment. 2nd ranking bank not selected

    Dear Experts,
    I need your help here.
    During the F110 (check payment), those banks customized as 2nd,3rd,4th or subsequent bank ranking could not produce any payment advice and checking printing. Where has goes wrong?
    If I change the 2nd ranking (Citibank) to 1st ranking, then Citibank will works well.
    I wonder why the F110 only takes the 1st ranking bank.
    Please help.
    Will assign points for solutions.
    Thanks a lot in advance.

    Hi Nitin,
    You mean the available amount for each house bank?
    I have alraedy maintained the amount for each house bank at a very high amount and the F110 payment is not exceeding the amount set.
    Please help.

  • Using lag and rank in the same query

    Hi
    I am trying to find out the difference in time between peoples memberships and also the order that these memberships are taken out in. So far I have added in a rank statement to work out the order the memberships were created in, but now want to look at the difference between the dates returned. The SQL I used is:
    SELECT owner_party_id,
    mem_number,
    support_id,
    mem_start_date,
    RANK() OVER (PARTITION BY owner_party_id ORDER BY mem_start_date ASC) MEMBERSHIP_SEQUENCE
    FROM membership_all
    WHERE version_type = 'CUR'
    AND owner_party_id IN ('65051', '65051', '65348', '65348', '65607', '65607', '65607')
    to get:
    "OWNER_PARTY_ID"|"MEM_NUMBER"|"SUPPORT_ID"|"MEM_START_DATE"|"MEMBERSHIP_SEQUENCE"
    65051|318874751|8014747|01-MAR-10|1
    65051|412311060|21502883|15-AUG-12|2
    65348|308672459|3526913|01-MAY-10|1
    65348|409951130|20950524|18-JUN-12|2
    65607|315830192|7510133|17-MAY-10|1
    65607|406448110|20024246|16-MAR-12|2
    65607|409738130|20903556|14-JUN-12|3
    Now I would like to calculate the difference between the start dates of each of the owner_party_id groups, so to get something like this:
    OWNER_PARTY_ID|MEM_NUMBER     |SUPPORT_ID|MEM_START_DATE     |MEMBERSHIP_SEQUENCE|Diff
    65051|318874751|8014747|01-Mar-10|1|     
    65051|412311060|21502883|15-Aug-12|2|898
    65348|308672459|3526913|01-May-10|1     
    65348|409951130|20950524|18-Jun-12|2|779
    65607|315830192|7510133|17-May-10|1     
    65607|406448110|20024246|16-Mar-12|2|669
    65607|409738130|20903556|14-Jun-12|3|90
    I think that I need to use the Lag function in, but I am not too sure if it can be linkited to look at the data within a grouping of owner party id, as it would make no sense to calculate the difference in dates for two different owner party ids.
    Any advice much appreciated.
    Thanks
    Edited by: 992871 on 09-Mar-2013 23:34

    Couple notes:
    1. You wrote you want to get order that these memberships are taken out in, however, both your and Etbin's queries calculate order within each owner_party_id and not across all members. If you want to get rank and difference in time regardless of member's owner_party_id remove PARTITION BY caluse.
    2. You might want to use DENSE_RANK and not RANK depending how you want to display rank. If two people joined at the same time and were second in rank, analytic RANK will be:
    RANK
    1
    2
    2
    4
    5
    .while DENSE_RANK:
    DENSE_RANK
    1
    2
    2
    3
    4
    .SY.

  • Need Help to Densify and Rank Data

    Hi Pros!
    I've been researching, but can still use some help here with a telecom application. Say I have the following records in table cost:
    Acct,Code,     Rate
    1,     001,      .1
    1,     0012,      .1
    2,     001,      .2
    2,     0012,      .2
    2,     00123,      .2
    2,     001234,     .2
    And I want the following results:
    Row, Code, Acct, Rate, Rank,
    1, 011, 1, .1, 1
    2, 011, 2, .2, 2
    3, 0012, 1, .1, 1
    4, 0012, 2, .2, 2
    5, 00123, 1, .1, 1
    6, 00123, 2, .2, 2
    7, 001234, 1, .1, 1
    8, 001234, 2, .2, 2
    I use the following query for the ranking:
    SELECT code, acct, rate, drank
    FROM (SELECT code, acct_id, DENSE_RANK() OVER(PARTITION BY code ORDER BY rate ASC) drank
    FROM costs)
    Because the data is not uniform (or dense), I would only get the following results:
    Row Code Acct Rate Rank
    1, 011, 1, .1, 1
    2, 011, 2, .2, 2
    3, 0012, 1, .1, 1
    4, 0012, 2, .2, 2
    5, 00123, 2, .2, 1
    6, 001234, 2, .2, 1
    So what I'm looking for is to densify the data so that for code 00123 and 001234
    rates in account 1 would be duplicated for the higher codes as follows:
    Acct Code Rate
    1, 001, .1
    1, 0012, .1
    1, 00123, .1
    1, 001234, .1
    So if accounts without rates for the more specific codes are replicated out to match accounts with the most specific codes, I would have correct ranking. This is for routing purposes, so if a shorter code exists within a longer code and has a cheaper rate, then I would want to have a match there. Cost table can have 10 m rows or more.
    Any help would be greatly appreciated
    Thanks all.

    You may use partitioned outer join.
    Completion of data series by analytical function

  • Need help with RANK() on NULL data

    Hi All
    I am using Oracle 10g and running a query with RANK(), but it is not returning a desired output. Pleas HELP!!
    I have a STATUS table that shows the history of order status.. I have a requirement to display the order and the last status date (max). If there is any NULL date for an order then show NULL.
    STATUS
    ORD_NO | STAT | DT
    1 | Open |
    1 | Pending |
    2 | Open |
    2 | Pending |
    3 | Open |1/1/2009
    3 | Pending |1/6/2009
    3 | Close |
    4 | Open |3/2/2009
    4 | Close |3/4/2009
    Result should be (max date for each ORD_NO otherwise NULL):
    ORD_NO |DT
    1 |
    2 |
    3 |
    4 |3/4/2009
    CREATE TABLE Status (ORD_NO NUMBER, STAT VARCHAR2(10), DT DATE);
    INSERT INTO Status VALUES(1, 'Open', NULL);
    INSERT INTO Status VALUES(1, 'Pending', NULL);
    INSERT INTO Status VALUES(2, 'Open', NULL);
    INSERT INTO Status VALUES(2, 'Pending',NULL);
    INSERT INTO Status VALUES(3, 'Open', '1 JAN 2009');
    INSERT INTO Status VALUES(3,'Pending', '6 JAN 2009');
    INSERT INTO Status VALUES(3, 'Close', NULL);
    INSERT INTO Status VALUES(4, 'Open', '2 MAR 2009');
    INSERT INTO Status VALUES(4, 'Close', '4 MAR 2009');
    COMMIT;
    I tried using RANK function to rank all the orders by date. So used ORDER BY cluse on date in descending order thinking that the null dates would be on top and will be grouped together by each ORD_NO.
    SELECT ORD_NO, DT, RANK() OVER (PARTITION BY ORD_NO ORDER BY DT DESC)
    FROM Status;
    ...but the result was something..
    ORD_NO |DT |RANKING
    *1 | | 1*
    *1 | | 1*
    *2 | | 1*
    *2 | | 1*3 | | 1
    3 |1/6/2009 | 2
    3 |1/1/2009 | 3
    4 |3/4/2009 | 1
    4 |3/2/2009 | 2
    I am not sure why didn't the first two ORD_NOs didn't group together and why ranking of 1 was assigned to them. I was assuming something like:
    ORD_NO |DT |RANKING
    *1 | | 1*
    *1 | | 2*
    *2 | | 1*
    *2 | | 1*
    3 | | 1
    3 |1/6/2009 | 2
    3 |1/1/2009 | 3
    4 |3/4/2009 | 1
    4 |3/2/2009 | 2
    Please guide me if I am missing something here?
    Regards
    Sri

    Hi,
    If i well understood, you don't need rank
    SELECT   ord_no, MAX (dt)KEEP (DENSE_RANK LAST ORDER BY dt) dt
        FROM status
    GROUP BY ord_no
    SQL> select * from status;
        ORD_NO STAT       DT
             1 Open
             1 Pending
             2 Open
             2 Pending
             3 Open       2009-01-01
             3 Pending    2009-01-06
             3 Close
             4 Open       2009-03-02
             4 Close      2009-03-04
    9 ligne(s) sélectionnée(s).
    SQL> SELECT   ord_no, MAX (dt)KEEP (DENSE_RANK LAST ORDER BY dt) dt
      2      FROM status
      3  GROUP BY ord_no;
        ORD_NO DT
             1
             2
             3
             4 2009-03-04
    SQL>

  • How can i use multiple values in RANK

    HI All,
    we hav eto display RANK  by mutilpe values .
    i mean  we have sales amount , qty, name  we have to dispaly top 20 rank with  amount  if amount is equal after 6 th rank then second pirority goes to qunatity for remaiing ranks if  after 15th rank if quantity also equal then it should rank based on name for remaing ranks   is it possible in Obiee 11g?
    If we are able to top 20 ranks by amount only then  we are no need to worry about remaing values.
    like RANK ( Amount , Qty , Name ) ....
    Thanks in advance for your time.

    If yours is OBIEE 11g play with Selection Steps you will get that fixed easily the following blog will give you an idea
    Rittman Mead Consulting &amp;raquo; Blog Archive &amp;raquo; Oracle BI EE 11g &amp;#8211; Filters &amp;amp; Selection…
    Thanks
    NK

  • Using ranking and sum to get top 5 products' share of total market

    Hi everybody,
    I have been playing around with ranking for a while now and I am stuck..
    I have a crosstab where I want to show the top 5 products in a specific month. So I have month in my column and products in my rows. I applied a ranking based on revenue only showing the top 5 products. This works like a charm.
    Now I would like to sum up the top 5 products' revenue and compare it with the revenue of all products in the market. I have managed to sum the top 5 products' revenue by using the "sum" function in the block, but I have not been able to compare this measure with a total market revenue measure. It seems like because I made the ranking on the top 5 products I cannot create a measure which includes more than these top 5 products and put it in that block.
    Is this not something Webi can easily handle??
    Thanks in advance!
    Best regards,
    Morten

    Hi Jaime,
    Thank for the suggestion. I forgot to mention that the month column is only showing one month. There is a filter on the month dimension, so that only one month is shown.
    I tried using the In Report context, but it gave me wrong results... It seems like it included all months.. I also tried using the noFilter function, but it also gave me wrong results.
    Best regards,
    Morten

Maybe you are looking for

  • When I click on a web link to open in a new window - it has double bars, no URL...

    When I click on a web link to open in a new window - it has double Browser bars (chrome), no URL. I close that window and do it again it often works correctly. I have made screen shots and placed at pageaccess.com/FireFox_5-6_issue.pdf

  • User defined fields in Goods Issue and Goods Reciept

    Hello, I would like to know how to add user defined fields in the Goods Reciept and Goods Issue matrix. These two are not displayed under user defined fields management. Thanks, Edited by: Martin Kamau on Apr 15, 2009 5:34 PM

  • Bridge tries to open CS and not CS3

    For 3 months since installing CS3 and Bridge all was well. Suddenly Bridge tries to open files in CS on a different drive, and CS is non working. How do I change the linkage back from Bridge to CS3? Do I need to reinstall CS3?

  • Exchange Server 2013 on Srvr2012r2 fails on preinstall

    During the preinstall of the Exchange server 2013 on virtual Server 2012r2 the installation fails at the second step of the preinstall. I tried the wizard and it also fails station the user does not have the correct rights. This was probably caused b

  • Airport Express Not Working With Netgear Router

    I have two Airport Expresses connected to my Netgear WNDR3300.  I run Windows 7 on all my computers.  One express works fine, wirelessly streaming music in several rooms.  However, the other does not work unless it is plugged into my router.  When it