Column Values based on different parameters

Hi Gurus,
I have to create a report which has the caluculate #of installes, #of orders, # Completed on perticular date range in single report (kind a dashboard).
The # of installs need to calculated based on Install date range based on Installed date, #of orders need to calculated in Order date range based on order date and # of Completed on Completed date.
Could you please help me how to create for this kind of situation.
example: for last 10 days the number of Installs are 10 and orders are 20 and completed is 5.
can i create report like this
Division | Region | Intalls | orders |completed
filter
install date between last 10 days or
order date between last 10 days or
completed date between last 10 days.
or in need to create the combined request.
Thanks in advance
Regards
Ali

Hi Ali,
As per your requirement, you suppose create a view like
select division,region.sum(installs),sum(orders),sum(completed),aging from
(select division,region, sum(installs) installs, 0 orders,o completed, case when timestampdiff(SQL_TSI_DAY,tablename.install_date,current_date) between 0 and 10 then 'Less than 10 Days'
when timestampdiff(SQL_TSI_DAY,tablename.install_date,current_date) between 11 and 25 then '10-25 Days'
else '> 25 Days' end Aging
group by division,region,case when timestampdiff(SQL_TSI_DAY,tablename.install_date,current_date) between 0 and 10 then 'Less than 10 Days'
when timestampdiff(SQL_TSI_DAY,tablename.install_date,current_date) between 11 and 25 then '10-25 Days'
else '> 25 Days' end
union all
select division,region, 0 installs, sum(orders) orders,o completed, case when timestampdiff(SQL_TSI_DAY,tablename.order_date,current_date) between 0 and 10 then 'Less than 10 Days'
when timestampdiff(SQL_TSI_DAY,tablename.order_date,current_date) between 11 and 25 then '10-25 Days'
else '> 25 Days' end Aging
group by division,region,case when timestampdiff(SQL_TSI_DAY,tablename.order_date,current_date) between 0 and 10 then 'Less than 10 Days'
when timestampdiff(SQL_TSI_DAY,tablename.order_date,current_date) between 11 and 25 then '10-25 Days'
else '> 25 Days' end
union all
select division,region, 0 installs, 0 orders,sum(completed) completed, case when timestampdiff(SQL_TSI_DAY,tablename.completed_date,current_date) between 0 and 10 then 'Less than 10 Days'
when timestampdiff(SQL_TSI_DAY,tablename.completed_date,current_date) between 11 and 25 then '10-25 Days'
else '> 25 Days' end Aging
group by division,region,case when timestampdiff(SQL_TSI_DAY,tablename.completed_date,current_date) between 0 and 10 then 'Less than 10 Days'
when timestampdiff(SQL_TSI_DAY,tablename.completed_date,current_date) between 11 and 25 then '10-25 Days'
else '> 25 Days' end
group by division,region,aging
*(Note : Create aging based on your requirement)*
create a dashboard prompt on Aging
hope u understand....
Cheers,
Aravind

Similar Messages

  • How to fetch the Alias column values based on different column values?

    Hello Gurus,
    I have a table with the following struture -
    "drop table T;
    create table T(Name, Symbol, Amount,dep) as select
    'Anderia', 'AA', 1050000,'HR' from dual union all select
    'Michael', 'ML',150000,'Sales' from DUAL union all select
    'Bill', 'BL', 1050000,'Finance' from dual union all select
    'Nancy', 'NY', 4000,'HR' from DUAL union all select
    'Anderia', 'AA',3000,'HR' from dual union all select
    'Michael', 'ML',1050000,'Sales' from DUAL union all select
    'Bill', 'BL', 1200000,'Finance' from DUAL union all select
    'Anderia', 'AA', 1200000,'HR' from DUAL union all select
    'Vish', 'VH', 1200000,'Marketing' from DUAL;"Ans try to find out the values of the column like
    Name,symbol,dep,Amount,%Total,$Cumm Total, Rank but some additional columns like -
    HR Amount, %HRTotal,$HR Cumm Total,
    Finance Amount, %FinanceTotal,$Finance Cumm Total
    Sales Amount, %SalesTotal,$Sales Cumm Total,
    Marketing Amount, %MarketingTotal,$Marketing Cumm Total
    then i am using the following query to fetch the Name,symbol,dep,Amount,%Total,$Cumm Total, Rank columns -
    select name
         , decode(grouping(symbol), 0, symbol, 'Total') symbol
         , dep
         , sum(amount) amount
         , sum(per_total) "% Total"
         , decode(grouping(symbol), 0, max(Cum_per_total), null) "% Cumm Total"
         , decode(grouping(symbol), 0, max(rank), null) rank
      from (
              select name
                   , symbol
                , dep
                   , amount
                   , per_total
                   , sum(per_total) over(order by rk) cum_per_total
                   , rank
                   , rk
                from (    
                        select name
                             , symbol
                    , dep
                             , sum(amount) amount
                             , round((sum(amount)/max(total_amount)) * 100,2) per_total
                             , dense_rank () over (order by sum(amount) desc) as rank
                             , row_number() over(order by sum(amount) desc) as rk
                          from (
                                 select name
                                      , symbol
                                      , amount
                          , dep
                                      , sum(amount) over() total_amount
                                      , sum(amount) over ()
                                   from t
                         group
                            by name, symbol, dep
      group        
         by grouping sets((name, symbol, dep), ())
      order by rank, max(rk) nulls lastBut i want to fetch the following columns as well.......how can i do it?-
    HR Amount, %HRTotal,$HR Cumm Total,
    Finance Amount, %FinanceTotal,$Finance Cumm Total
    Sales Amount, %SalesTotal,$Sales Cumm Total,
    Marketing Amount, %MarketingTotal,$Marketing Cumm Total
    as i want all of the records, then going to specific to the dep.....do i need to use the case here?
    Thanks for all of your time and effort in advance

    Hello Frank Kulash/Łukasz Mastaler,
    Thanks for your time and effort.
    I am using the Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    I am looking forward to have some additional columns (column alias) along with the the returned by the mentioned query - which are named as -
    1- HR Amount
    2- %HRTotal
    3- %HR Cumm Total
    4- Finance Amount
    5- %FinanceTotal
    6- %Finance Cumm Total
    7- Sales Amount
    8- %SalesTotal
    9- %Sales Cumm Total
    10 -Marketing Amount
    11- %MarketingTotal
    12- %Marketing Cumm Total
    based on the logic like -
    HR Amount = sum of amount case dep ='HR'
    %HR Total = % of amount case dep ='HR'
    %HR Cumm Total (cumulative % based on the cumulative total of %HR Total) = Cumm % of amount case dep ='HR'
    similarly rest of the column........
    Now how do i use case with a logic so that it returns me the columns as i want them ...using the above mentioned query .......
    Kindly help me .....thanks in advance for all of your time

  • Change Column Value based on Characteristic in Rows

    I am not sure it is possible.
    We have product prices at different levels of customer hierarchy.
    Channel > Division > Region > Market
    One Region can have multiple Markets.  Each market can have different Rates.  But the Region will have a different Rate which many not be the average rate of all market (assigned as part of master data)
    I have a column for Product Price.  So when a Report is run at Market Level it should use Market Rate.  If Market is Removed and Region is dragged into the report it should use Region Rate for Product Price.
    Product Price is Restricted by Rate Type value to determine which Rate is used.
    Is there a way to dynamically determine the define the column value based on the characteristic value in the ROWS.
    Thanks

    Hi,
    For every CHAR like Market/Region there will be some key. For example Maket1 = 11 and Market2 = 22. If that key is a number then you may create replacement path variable on that and convert the same in numbers then you may create various CKF (for various rate type) and put "If" condtion and check for those replacement path CKF and use the apprpriate one.
    You need to write some tricky formula at CKF levels. This is one of the way to achieve that.
    I hope it will help.
    Thanks,
    S

  • Better approach for checking column values between two different rows

    My requirement is to find best Approach to find difference between column values of two different rows.Below I've mentioned two different
    approaches I'm thinking of,but I'd like to know is there any other better approach.
    version details
    SQL> SELECT *
      2  FROM V$VERSION;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE    11.1.0.7.0      Production
    TNS for Solaris: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - ProductionTable creation script
    CREATE TABLE R_DUMMY
       (CA_ID VARCHAR2(16) NOT NULL ENABLE,
         CA_VER_NUM NUMBER(4,2) NOT NULL ENABLE,
         BRWR_SHORT_NAME VARCHAR2(25 CHAR),
         sic_code     number,
         FAC_ID VARCHAR2(10) NOT NULL ENABLE
    / insert script
    insert into r_dummy (CA_ID, CA_VER_NUM, BRWR_SHORT_NAME, sic_code, FAC_ID)
    values ('CA2001/11/0002', 2.00, 'Nandu',1234, 'FA000008');
    insert into r_dummy (CA_ID, CA_VER_NUM, BRWR_SHORT_NAME, sic_code, FAC_ID)
    values ('CA2001/11/0002', 3.00, 'SHIJU',456, 'FA000008');Desired O/P :
    ca_id               fac_id          column_name          previous name          after_modification
    CA2001/11/0002          FA000008     BRWR_SHORT_NAME          Nandu               SHIJU
    CA2001/11/0002          FA000008     sic_code          1234               456My approach
    select      ca_id,fac_id,column_name,
         decode(column_name,'BRWR_SHORT_NAME',lg_brwr,lg_sic) previous_name ,
         decode(column_name,'BRWR_SHORT_NAME',ld_brwr,ld_sic) after_modification
    from
         select
                   case
                        when ld_brwr != lg_brwr then
                        'BRWR_SHORT_NAME'
                        when ld_brwr != lg_brwr then
                        'sic_code'
                   end
              ) column_name,ca_id,fac_id,lg_brwr,ld_brwr,ld_sic,lg_sic
         from     (
              select ca_id,fac_id,lag_brwr,ld_brwr,ld_sic,lag_sic
              from
                        Select      lead(brwr_short_name,1) over(partition by ca_id,fac_id) ld_brwr,
                             lag(brwr_short_name,1) over(partition by ca_id,fac_id) lg_brwr,
                             lead(sic_code,1) over(partition by ca_id,fac_id) ld_sic,
                             lag(sic_code,1) over(partition by ca_id,fac_id) lg_sic,
                             ca_id,fac_id
                        from r_dummy
              where (ld_brwr != lg_brwr or ld_sic != lg_sic)
    )2nd Approach :
    =============
    select      ca_id,fac_id,column_name,
         decode(column_name,'BRWR_SHORT_NAME',lg_brwr,lg_sic) previous_name ,
         decode(column_name,'BRWR_SHORT_NAME',ld_brwr,ld_sic) after_modification
    from
         select
                   case
                        when ld_brwr != lg_brwr then
                        'BRWR_SHORT_NAME'
                        when ld_brwr != lg_brwr then
                        'sic_code'
                   end
              ) column_name,ca_id,fac_id,lg_brwr,ld_brwr,ld_sic,lg_sic
         from     (
              select ca_id,fac_id,brwr_short_name,sic_code
              from
                        Select      ca_id,fac_id,brwr_short_name lg_brwr,sic_code lg_sic
                        from     r_dummy
                        where     ca_ver_num = '2.00'
                   )o,(
                        Select      ca_id,fac_id,brwr_short_name ld_brwr,sic_code ld_sic
                        from     r_dummy
                        where     ca_ver_num = '3.00'
                              )n
              where      0.ca_id = n.ca_id
                   and 0.fac_id = n.fac_id
                   and (ld_brwr != lg_brwr or ld_sic != lg_sic)
    )Hi Experts,
         I've provided sample data where I'm checking for just two columns viz brwr_short_name ,sic_code,but in real time
    I've to check for 8 more columns so please suggest me with a better approach.
    I appreciate your precious suggestions.

    Hi,
    Thanks for posting the CREATE TABLE and INSERT statements; that really helps!
    Here's one wa. Like your 2nd approach, this uses a self-join:
    WITH     got_r_num     AS
         SELECT  ca_id
         ,     ROW_NUMBER () OVER ( PARTITION BY  ca_id
                                   ,                    fac_id
                             ORDER BY        ca_ver_num
                                 )    AS r_num
         ,     brwr_short_name
         ,     TO_CHAR (sic_code)     AS sic_code
         ,     fac_id
    --     ,     ...     -- Other columns (using TO_CHAR if needed)
         FROM     r_dummy
    ,     unpivoted_data     AS
         SELECT     *
         FROM     got_r_num
         UNPIVOT     INCLUDE NULLS
              (    txt
              FOR  column_name IN ( brwr_short_name          AS 'BRWR_SHORT_NAME'
                            , sic_code               AS 'SIC_CODE'
    --                        , ...     -- Other columns
    SELECT       p.ca_id
    ,       p.fac_id
    ,       p.column_name
    ,       p.txt          AS previous_name
    ,       a.txt          AS after_modification
    FROM       unpivoted_data   p
    JOIN       unpivoted_data   a  ON  p.ca_id     = a.ca_id
                           AND p.fac_id     = a.fac_id
                         AND p.column_name     = a.column_name
                         AND p.r_num      = a.r_num - 1
                         AND p.txt || 'X' != a.txt || 'X'
    ORDER BY  a.r_num
    ;To include other columns, add them in the 2 places where I put the comment "Other columns".
    Ca_ver_num can have any values, not just 2.00 and 3.00.
    This will show cases where a value in one of the columns changed to NULL, or where NULL changed to a value.
    There ought to be a way to do this without a separate sub-query like got_r_num. According to the SQL Language manual, you can put expressions in the UPIVOT ... IN list, but when I tried
    ...     UNPIVOT     INCLUDE NULLS
              (    txt
              FOR  column_name IN ( brwr_short_name          AS 'BRWR_SHORT_NAME'
                                 , TO_CHAR (sic_code)     AS 'SIC_CODE'
              )I got the error "ORA_00917: missing comma" right after TO_CHAR. Perhaps someone else can show how to eliminate one of the sub-queries.

  • Setting column values based on LOV selection

    Hi All,
    I am using JDeveloper 11.1.2.2.0. I have a table eg: Department table, in Dept Id, I have defined LOV for that field. My requirement is, based on the LOV selection, I want to set the other column values. I am using InputTextwithLOV in list type. How to achieve this?
    I tried mentioning that in the List return values. But it is not setting the values.
    Regards,
    Infy

    Hi,
    if you use a model driven LOV then when configuring the LOV you can map additional attributes. When you build a model driven LOV you at least once tell it which LOV attribute should be used to update the DeptId field. You can do the same for additional attributes
    Frank

  • Change column value based on another

    Hi, everyone.
    my version 11.1.2.2.0.
    i wanna change 1 column's value based on another column's value that be selected.
    ex: select 2rd column to 'A' , then the 1rd should be 'New Start'.
    i used EL like #{row.bindings.MacdType.inputValue eq 1 ? 'New Start' :  row.bindings.CircuitId.inputValue}.
    But it does not set the inputvalue which should binding with the DataSource.
    what's the best way to do these logic?
    pls help. thx

    Hi,Abhijit;
    ex: the frist column is a LOV, the user select "A" for the first column, so the value of the second column should be changed to 'New Start'.
    And the value should be binding to the DC, when save, the value of the 2rd column should be saved to DB.
    thx

  • Best way to compare column values of 2 different records

    Hi,
    In my PL/SQL cursor, I want to store the column values of the first record and compare it with the column values of the next record to compare if they have duplicate column values. Should I store the results of the first record with an array and the second item using the cursor? Can you provide me the best practices? Thanks.
    DECLARE
    CURSOR cs IS
    SELECT
    A,
    B
    FROM TABLE;
    BEGIN
    for rec in cs
    loop
    -- this is where I would like to store the column values of the first record and
    -- then compare it with the column values of the 2nd record.
    end loop;
    END;

    The best practice I can recommend would be to not use PL/SQL at all. Cursor FOR LOOPs are one of the slowest forms of processing.
    You should investigate analytical functions such as LAG and LEAD at http://tahiti.oracle.com
    It is always helpful to provide the following:
    1. Oracle version (SELECT * FROM V$VERSION)
    2. Sample data in the form of CREATE / INSERT statements.
    3. Expected output
    4. Explanation of expected output (A.K.A. "business logic")
    5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to re-calculate a column value based on another column value in the same ADF Table row

    Hi,
    I'm using Jdeveloper 11.1.2.3.0.
    I have an adf table with 2 columns, columnA and columnB.
    When the value changed in ColumnA,
    1) i need to call a PLSQL and update the ColumnB value that is returned from PLSQL.
    2) Show a warning message if the existing value in ColumnB is different from the one that is returned from PLSQL.
    Can anybody suggest how can i accomplish this?
    Thanks,
    Vinod

    hi user,
    if you have inputtext means have a valuechangelistener
    in that call your pl/sql function supply input value to the appropriate function then grab the result of the function. then bind the column inputtext and compare with it. then raise your warning using FacesMessage classes.
    Sameh Nassar: Create PL/SQL Function And Call It From Your ADF Application

  • Get a Column value based on other column value in a single query

    Hi All,
    I have a problem here -
    In Table XYZ I have columns by name A, B, C and COL_I. COL_I has a value A or B or C. Based on the value in COL_I, I need to get the value from the corresponding column in the table.
    For Ex: If the COL_I has the value as 'A' then I need to fetch the value from the column A. If it is 'B' then fetch from column B.
    This has to be done in a single query.
    Thanks,
    san_mah

    Hi You can use this query
    I have taken this simple case
    SQL> desc column_fetch
    Name Null? Type
    C_FIRST_NAME VARCHAR2(30)
    C_MIDDLE_NAME VARCHAR2(30)
    C_LAST_NAME VARCHAR2(30)
    C_GET_NAME VARCHAR2(30)
    based on C_GET_NAME find values in columns C_FIRST_NAME,C_MIDDLE_NAME,C_LAST_NAME
    Values in Table
    SQL> select * from column_fetch
    2 ;
    C_FIRST_NAME C_MIDDLE_NAME C_LAST_NAME C_GET_NAME
    A B C D
    A B C F
    A B C F
    A B C A
    A B C B
    A B C C
    CASE Statement:
    SELECT
    CASE WHEN c_first_name=c_get_name THEN c_first_name
    WHEN C_MIDDLE_NAME=C_GET_NAME THEN C_MIDDLE_NAME
    WHEN C_LAST_NAME=C_GET_NAME THEN C_LAST_NAME
    ELSE 'Nothing' END
    FROM column_fetch;

  • Populate other column value based on previous row value using t-sql

    Hi All,
    I have one table with 6 columns, let say ID1, ID2,status, EnteredDate,NewValue, Old Value. Where ID1 is the primary key field
     ID1       ID2       status             EnteredDate        NewValue      
    Old Value
      1          XYZ       New              07/12/2012           
    ABC               null
      2          XYZ       Renewal        08/19/2012            DEF               
    null
      3          XYZ       Cancel           10/21/2012            GHI               
    null
      4          ZYX       New              09/15/2012           
    BDF               null
      5          ZYX       Cancel           10/21/2012            MNS             
    null
      6          MBS       New              05/29/2012           
    EXP               null
      7          SBX        New              05/29/2012           
    SKS               null
      8          SBX        Renewal        06/21/2012            QSR              
    SKS
    Basically I need a sql query which should populate Output as below. Status=New will always have old date compared to Renewal and Cancel and also OldValue field will be null always for status=New
    Output:
     ID1       ID2       status           EnteredDate        NewValue      
    Old Value     Row_Num(based on ID1,ID2,Entereddate)
      1          XYZ       New              07/12/2012           
    ABC               null                 1
      2          XYZ       Renewal        08/19/2012            DEF               
    ABC                2
      3          XYZ       Cancel           10/21/2012            GHI               
    DEF                 3
      4          ZYX       New              09/15/2012           
    BDF               null                   1
      5          ZYX       Cancel           10/21/2012            MNS              
    BDF                 2
      6          MBS       New              05/29/2012           
    EXP               null                  1
      7          SBX        New              05/29/2012           
    SKS               null                  1
      8          SBX        Renewal        06/21/2012            QSR              
    SKS                2
    Thanks in Advance, its very urgent. Pls send me the query ASAP.
    RH
    sql

    Hi,
    In case of you are using SQL 2012, you can use new built-in function like LAG, try this;
    USE tempdb
    GO
    CREATE TABLE dbo.Test
    ID1 int PRIMARY KEY
    , ID2 char(3) NOT NULL
    , Status varchar(20) NOT NULL
    , EnteredDate date NOT NULL
    , NewValue char(3) NOT NULL
    , OldValue char(3) NULL
    GO
    INSERT INTO dbo.Test
    (ID1, ID2, Status, EnteredDate, NewValue, OldValue)
    VALUES
    (1, 'XYZ', 'New', '07/12/2012', 'ABC', null)
    , (2, 'XYZ', 'Renewal', '08/19/2012', 'DEF', null)
    , (3, 'XYZ', 'Cancel', '10/21/2012', 'GHI', null)
    , (4, 'ZYX', 'New', '09/15/2012' ,'BDF', null)
    , (5, 'ZYX', 'Cancel', '10/21/2012', 'MNS',null)
    , (6, 'MBS', 'New', '05/29/2012', 'EXP', null)
    , (7, 'SBX', 'New', '05/29/2012', 'SKS', null)
    , (8, 'SBX', 'Renewal', '06/21/2012', 'QSR', 'SKS')
    WITH cte
    AS
    (SELECT ID1, ID2, Status, EnteredDate, NewValue, OldValue
    , ROW_NUMBER() OVER(PARTITION BY ID2 ORDER BY ID2) Row_Num
    , LAG(NewValue, 1, 0) OVER(PARTITION BY ID2 ORDER BY ID2) NewOldValue
    FROM dbo.Test)
    SELECT ID1, ID2, Status, EnteredDate, NewValue
    , NULLIF(NewOldValue, '0') NewOldValue, Row_Num
    FROM cte
    ORDER BY ID1, ID2;
    Dinesh Priyankara
    http://dinesql.blogspot.com/
    Please use Mark as answer (Or Propose as answer) or Vote as helpful if the post is useful.

  • Programatically Assigning Column Value Based on Another Column

    I have a problem as follows:
    My database table has the following setup:
    There may be many gift numbers the same, however many different recipient numbers for each gift.
    The receipient number should increment from 1-X based on the gift number, for example, if the gift number is the same then the receipient number should increment for that gift.
    Gift Number
    Recipient Number
    1
    1
    1
    2
    1
    3
    2
    1
    3
    1
    3
    2
    The programmatic code for inserting a new row would be:
    Check if gift number already exsists in database.
    -if it does exsist then find latest and increment current receipient number by one for receipment number
    -if it does not exsit set receipient number at 1
    How do i do this?
    JDEV - 11.1.2.4 (ADF BC)

    Your use case has some flaws which you should think about before trying to implement it.
    1) think about what happens if multiple users try to insert a record at the same time. What can happen? How do you want to handle this situation?
    2) do you really need the number to be gap less? The use case can be implemented easily if you don't have this restriction.
    3) The table should have the technical primary key to avoid pk clashes due to multiple inserts at one time.
    Now, if you have a technical pk as primary key, you can setup a unique key on both of the other columns which prevents that somehow you get duplicates there.
    You let the user insert the gift number and calculate the recipient number as max(recipient number)+1. Then you commit the record. If you don't get an error you are finished, if you get an error you add 1 to the recipient number and try to commit again, until the insert works.
    Timo

  • Can formula column values be used as parameters

    Post Author: vdm
    CA Forum: Formula
    Hi,
    I have various formula columns setup in my crystal report, these formula columns act as prompts when end users run the report. i am using crystal reports xi and sql server databse.
    Now I would like to use these formula columns to restrict my result set. basically, these should act as predicates (where clauses) to my query.
    Is there a way to pass formula columns as parameters to stored procedures or to commands or to simpy add them to a sql query ?
    thanks in advance

    Post Author: foghat
    CA Forum: Formula
    Have you tried adding the formula fields as a filter in the Record Selection Formula editor?So  Report --> Selection Formulas --> Recordand add: {database.field_a} = and {database.field_b} = and so on 

  • How to populate the values based on different selections in Dashboard Promp

    Hi,
    I have a group prompt, which has 2 drop downs. The DropDown1 decides the values of DropDown2.
    I have used a SQL query in the "Show" values which will populate the dropdowns.
    When a value is 'selected" from DropDown1, the selected value decided the values of DropDown2 which is again a SQL query.
    But I see that when a new value is selected from DropDown1, the values in DropDown2 will not change until I click on GO.Even after clicking GO, the previously selcted value is retained.
    As an illustration:
    animals,plants are the choices in the first drop down, which if, animal is selected would populate the dropdown2 with cow,sheep, tiger.
    Assume animal is selected. The second drop down now is populated with cow,sheep and tiger. Assume you chose sheep.This resulted in display of sheep related info on the BI page.
    Now if I go back to the first dropdown and select plants, I would expect the second drop down to be populated with fig, palm, coconut.
    However in my case I see only the proviously popluated animals in the DropDown2.
    If I click on Go, I see that the DropDown2 is populated with Sheep,,fig, palm, coconut. Ideally I should not have seen the prevously selected value in DropDown2.
    Here there are 2 problems stated for a group promt having 2 DropDowns where item chosen from one decides the values of the other dropdown
    1. On selecting an item from DropDown1, is not populating with the corresponding values in DropDown2
    2. When 'Go' is clicked, DropDown2 is populated with the corresponding values for DropDown1 + the previously selected value in DropDown2 is retained.
    Any input to get out of this problem will help
    thanks
    Shubha

    Hi
    I am using group prompt and has 4 drop downs.
    Value of one decides the other. Values for the dropdowns will be populated by SQL results.
    'Constrain' will not be available for sql results..
    How to go about this?
    thanks
    Shubha

  • Getting number for each column value based on Date order

    Hi,
    I have Data look like:
    I need to create new column highlighted in red (Team Number). Even if same team comes in several number of times, it should be tracked as new team with whatever is the next number. For eg. team2 comes second time, its is called as 3. If Team 2 comes again
    then it will be 4.
    Any help is appreciated.
    Thanks,
    Punia 

    Thanks for you reply Ricardo. It does work (but only if select 1 ticket).
    My bad I only posted one Ticket Number. Actually there are lots of them ( as below). Your code take all the tickets as one tickets.
    TicketNumber
    OwningTeam
    Status
    Date
    Team Number
    123
    TEAM 1
    Pick Up
    11/12/2014
    1
    123
    TEAM 1
    Complete
    11/12/2014
    1
    123
    TEAM 2
    Pick Up
    11/12/2014
    2
    123
    TEAM 2
    Complete
    11/12/2014
    2
    123
    TEAM 2
    Resolve
    11/17/2014
    2
    123
    TEAM 2
    Complete
    11/24/2014
    2
    123
    TEAM 2
    Pick Up
    12/8/2014
    2
    123
    TEAM 2
    Complete
    12/9/2014
    2
    123
    TEAM 2
    Provide Info
    12/17/2014
    2
    123
    TEAM 1
    Pick Up
    1/8/2015
    3
    123
    TEAM 1
    Resoved
    1/8/2015
    3
    456
    TEAM 1
    Pick Up
    11/12/2014
    1
    456
    TEAM 1
    Complete
    11/12/2014
    1
    456
    TEAM 2
    Complete
    11/24/2014
    2
    456
    TEAM 2
    Pick Up
    12/8/2014
    2
    456
    TEAM 2
    Complete
    12/9/2014
    2
    456
    TEAM 3
    Pick Up
    12/17/2014
    3
    456
    TEAM 3
    Working
    12/18/2014
    3
    456
    TEAM 1
    Pick Up
    1/8/2015
    4
    456
    TEAM 1
    Resoved
    1/8/2015
    4
    789
    TEAM 1
    Pick Up
    11/12/2014
    1
    789
    TEAM 1
    Complete
    11/12/2014
    1
    789
    TEAM 2
    Complete
    11/24/2014
    2
    789
    TEAM 2
    Pick Up
    12/8/2014
    2
    789
    TEAM 2
    Complete
    12/9/2014
    2
    789
    TEAM 1
    Complete
    12/12/2014
    3
    Any work around is really appreciated.
    Thanks,
    Rajneet

  • To fetch column values based on selected month and year

    Hi,
    I have a requirement where I have 2 prompts Fiscal Year and month on a report.
    Therefore when I select Year and the month I should get the ID's for the selected month till the first month of that fiscal year.
    E.g By selecting July  and year 2013 I should get all the id's in the report from Jan 2013 till July 2013.
    How to acheive his in OBIEE. Please help.

    what is the column for comparing these two dates ? I am considering CALENDAR_DATE
    CALENDAR_DATE BEWEEN
    CAST(concat('01-JUL-', (CASE WHEN pv_month in ('JAN', 'FEB', 'MAR') THEN CAST(((CAST(RIGHT(pv_Year),4) AS INT) -1) as CHAR) ELSE CAST((RIGHT(v_Year),4) as CHAR) END)) AS  DATE)
    AND
    CAST(concat(concat(concat('01-', v_month),'-'),(CASE WHEN v_month in ('JAN', 'FEB', 'MAR') THEN CAST(((CAST(RIGHT(v_Year),4) AS INT) -1) as CHAR) ELSE CAST((RIGHT(v_Year),4) as CHAR) END) AS DATE)
    This logic might work, just play around type casting..
    Regards,
    Srinivas

Maybe you are looking for

  • Odd subversion client behavior - has anyone seen this?

    We are using DW CS4 with the subversion client for version control. One of our developers, working on a mac with OS X v 10.5.6, sees odd behavior when using 'Put' to send a file from his local copy to either a testing server or the remote site. What

  • How to pass more than 10 parameters to OnDemand process?

    If have created some application items to use as parameters. When I do in my javascript get.addParam('F_PAR_REPORT',pReport); and I use this parameter in onDemand process as :F_PAR_REPORT , I get The requested URL /pls/apex/<!DOCTYPE HTML PUBLIC "-//

  • Bashmount-1.6.2 with udevil

    Hello. This is my first post in this forum. I use arch in one of my machines, though I am not an active member of the arch community (well, not until now, I guess ). Following IgnorantGuru's advice, I am posting this here. He told me that there's a b

  • Default Number Ranges

    hi folks, Is there any way we can default the "Internal Number Range" in the 'Grouping'  field of Business Partner maintenance screen? When user creates the BP, he should see "Internal Number Range" in the "Grouping" field. Currently, it is empty and

  • CVS update "Create New Folders" unavailable

    Summary: The Create New Folders checkbox in the Update from CVS options selection window is always inactive. I am using JDeveloper 10g v9.0.5.0.0.1375 Preview with "CVS Client Version: (CVSNT) 2.0.11 (client/server)". Detail: After having checked out