Value based on date param?

i work for a electric utility and we have customer meter readings imported into the database on a daily basis.  I would like to be able to calculate the daily use based on (2) date parameters (BEGDATE) & (ENDDATE).  Any ideas how to approach this?

Try to apply the fileter condition like this
>={?BeginDate} and <={?EndDate}
Now insert a summary in the report footer on meeter readings like this
sum({Meter Reading})
Regards,
Raghavendra.G

Similar Messages

  • Filter value based on Date in OBIEE 11g, Reporting Issue

    Hi,
    I have following tables
    Dim_Item
    Dim_Loc
    Fact_Price-Item_Key,Loc_Key,Date_Key,Reason_Code,Amount,Load_date
    Reason Code is the code which discribes the reson behind price change
    Amount- price of Item at particular location (Note: one item can have different price at different location)
    Load Date - When ever there is price change for a particular item at particular location new record is inserted in the fact load date represents the date on which the data is updated
    Item_key  Loc_key  Date_key  Reason_Code  Amount  Load_Date
    1                  1        20131113                  0          1400    13/11/2013
    1                  1        20131115                  6          1100    15/11/2013
    2                  1        20131112                  0          900      12/11/2013
    2                  2        20131112                  0          1200    12/11/2013
    2                  2        20131113                  3          325      13/11/2013
    My report requirement is
    Report should show only the Item & location for which there is price change
    Report should be like
    Item Loc Orignal_Amt Changed_Amt
    1       1         1400           1100
    2       2         1200            325
    I have tried to calculate Orignal_Amt by taking Min(Load_Date) & Changed_Amt by taking Max(Load_Date) but result is not correct
    I need to min(Load_Date) or max(load_date) for an Item at particular location
    i.e it should be like min(load_date by item_key,loc_key)
    max(load_date by item_key,loc_key)
    then I can filter out Amount based on this min & max value.
    How can I achive this, is there any other approach to achive this
    Thanks
    Sameer

    Hi,
    Does this approach with comparing prices in the first and last date of the period actually indicates the price change?
    What about the sample data below - is considered to be a price change or not?
    Item_key  Loc_key  Date_key  Reason_Code  Amount  Load_Date
    2                  2        20131110                  0          325     12/11/2013
    2                  2        20131111                  0          1100    12/11/2013
    2                  2        20131112                  0          1200    12/11/2013
    2                  2        20131113                  3          325      13/11/2013
    Option #1:
    Use 2 requests:
    Req1 selects surrogate key for the first and last record by load date for each location and product. Surrogate key is just a concatenated expression of Item_Key, Loc_Key and Load_Date fields (use separators between them).
    For this request you need to filter out all other dates but first and last - use Rank function with BY clause. It will be 2 calculated fields: RANK(Date_Load BY Item_Key, Loc_Key) = last date, RANK(-Date_Load BY Item_Key, Loc_Key) = first date. Select records having any of these ranks=1.
    In result this request should return up to 2 records for each product-location combination with surrogate key, something like this for my example:
    Item_key  Loc_key  Date_key  Reason_Code  Amount  Load_Date          KEY
    2                  2        20131110                  0          325     12/11/2013      LOC:2;ITM:2;DT:20131110
    2                  2        20131113                  3          325      13/11/2013     LOC:2;ITM:2;DT:20131113
    In fact, it could be more than 2 records in case there are more than 1 change in a day for the price and no time stored on date field. This is up to you how to eliminate duplicates.
    Now you have another request, resulting one, which is filtered by Req1 using the same surrogate key expression. Orignal_Amt =Min(Amount), Change_Amt = Max(Amount). Apply a filter to find records with different values between them.
    In result, if product price is the same in the beginning and end of period (or it is single record) - these records will be filtered out, otherwise you get them in the report.
    Option #2:
    Play around with logical SQL under Advanced tab, it allows you to write requests with joins (as regular SQL does).
    This is sort of desperate option as such an analysis is hard to maintain (make modifications to it).

  • How to get previous values based on date filters

    Hi
    i have two fields gldate and startdate
    gldate values are like 1/31/2011,2/28/2011,3/31/2011,4/30/2011,5/31/2011 ...
    startdate values 1/1/2011,2/1/2011,3/1/2011,4/1/2011,5/1/2011 ...
    i need a condition like gldate<startdate
    if startdate is 11/1/2011 then i get all the values before 11/1/2011 values
    im using filter for date filed
    let us filter values is startdate--11/1/2011 and gldate is 11/30/2011 but that cond falls
    how to get this condition
    plz its urgent to me

    Hi
    i have two fields gldate and startdate
    gldate values are like 1/31/2011,2/28/2011,3/31/2011,4/30/2011,5/31/2011 ...
    startdate values 1/1/2011,2/1/2011,3/1/2011,4/1/2011,5/1/2011 ...
    i need a condition like gldate<startdate
    if startdate is 11/1/2011 then i get all the values before 11/1/2011 values
    im using filter for date filed
    let us filter values is startdate--11/1/2011 and gldate is 11/30/2011 but that cond falls
    how to get this condition
    plz its urgent to me

  • Assign values based on data range

    Hi
    I am trying to fix a query that I ahve been left with from a previous developer.
    The basis of it are that I have 2 views, one which is effectively a date calendar with users per date, and the 2nd being values assigned between a 2 date ranges.
    here is sample data
    create table #hours (
    Fee_earner_Code int not null
    ,startdate date not null
    ,enddate date not null
    ,hours decimal (17,2) not null
    insert into #hours values (1132,'2011-06-01','2020-01-01',6.00)
    insert into #hours values (1132,'2011-06-07','2011-06-01',4.00)
    insert into #hours values (1132,'2012-06-09','2011-06-07',12.00)
    insert into #hours values (2345,'2011-06-01','2020-01-01',3.00)
    insert into #hours values (2345,'2011-06-06','2011-06-01',9.00)
    insert into #hours values (2345,'2012-06-10','2011-06-06',5.00)
    create table #dates (Fee_earner_Code int not null
    ,Primary_date date not null
    insert into #dates values (1132,'2011-06-01')
    insert into #dates values (1132,'2011-06-02')
    insert into #dates values (1132,'2011-06-03')
    insert into #dates values (1132,'2011-06-04')
    insert into #dates values (1132,'2011-06-05')
    insert into #dates values (1132,'2011-06-06')
    insert into #dates values (1132,'2011-06-07')
    insert into #dates values (1132,'2011-06-08')
    insert into #dates values (1132,'2011-06-09')
    insert into #dates values (1132,'2011-06-10')
    insert into #dates values (1132,'2011-06-11')
    insert into #dates values (1132,'2011-06-12')
    insert into #dates values (2345,'2011-06-01')
    insert into #dates values (2345,'2011-06-02')
    insert into #dates values (2345,'2011-06-03')
    insert into #dates values (2345,'2011-06-04')
    insert into #dates values (2345,'2011-06-05')
    insert into #dates values (2345,'2011-06-06')
    insert into #dates values (2345,'2011-06-07')
    insert into #dates values (2345,'2011-06-08')
    insert into #dates values (2345,'2011-06-09')
    insert into #dates values (2345,'2011-06-10')
    insert into #dates values (2345,'2011-06-11')
    insert into #dates values (2345,'2011-06-12')
    for the table #hours the end date is alway the previous rows startdate unless it is the 1st row per fee_earner_Code then it is assigned '2020-01-01' (this date can be change as it is just another view)
    I would like to apply the #hours hours value to the appropriate date range in #dates per fee-earner-code
    my expected ouput would be
    1132,2011-06-01,6.00
    1132,2011-06-02,6.00
    1132,2011-06-03,6.00
    1132,2011-06-04,6.00
    1132,2011-06-05,6.00
    1132,2011-06-06,6.00
    1132,2011-06-07,4.00
    1132,2011-06-08,6.00
    1132,2011-06-09,12.00
    1132,2011-06-10,12.00
    1132,2011-06-11,12.00
    1132,2011-06-12,12.00
    2345,2011-06-01,3.00
    2345,2011-06-02,3.00
    2345,2011-06-03,3.00
    2345,2011-06-04,3.00
    2345,2011-06-05,3.00
    2345,2011-06-06,9.00
    2345,2011-06-07,9.00
    2345,2011-06-08,9.00
    2345,2011-06-09,9.00
    2345,2011-06-10,5.00
    2345,2011-06-11,5.00
    2345,2011-06-12,5.00
    Any help would be great

    With SQL Server 2012's Windows functions, this becomes easy. We can use it to fix the data in your hours table:
    DECLARE @hours TABLE (Fee_earner_Code int not null, startdate date not null, enddate date not null, hours decimal (17,2) not null)
    INSERT INTO @hours (Fee_earner_Code, startdate, enddate, hours) VALUES (1132,'2011-06-01','2020-01-01',6.00),(1132,'2011-06-07','2011-06-01',4.00),(1132,'2012-06-09','2011-06-07',12.00),(2345,'2011-06-01','2020-01-01',3.00),(2345,'2011-06-06','2011-06-01',9.00),(2345,'2012-06-10','2011-06-06',5.00)
    DECLARE @dates TABLE (Fee_earner_Code int not null, Primary_date date not null)
    INSERT INTO @dates (Fee_earner_Code, Primary_date) VALUES (1132,'2011-06-01'),(1132,'2011-06-02'),(1132,'2011-06-03'),(1132,'2011-06-04'),(1132,'2011-06-05'),(1132,'2011-06-06'),(1132,'2011-06-07'),(1132,'2011-06-08'),
    (1132,'2011-06-09'),(1132,'2011-06-10'),(1132,'2011-06-11'),(1132,'2011-06-12'),(2345,'2011-06-01'),(2345,'2011-06-02'),(2345,'2011-06-03'),(2345,'2011-06-04'),
    (2345,'2011-06-05'),(2345,'2011-06-06'),(2345,'2011-06-07'),(2345,'2011-06-08'),(2345,'2011-06-09'),(2345,'2011-06-10'),(2345,'2011-06-11'),(2345,'2011-06-12')
    ;WITH fixHours AS (
    SELECT *, DATEADD(DAY,-1,LEAD(startDate) OVER (PARTITION BY Fee_earner_code ORDER BY startDate)) AS realEndDate
    FROM @hours h
    SELECT h.Fee_earner_Code, d.Primary_date, h.hours
    FROM fixHours h
    LEFT OUTER JOIN @dates d
    ON d.Primary_date BETWEEN h.startDate AND realEndDate
    Without it, we need to do a self join to acheive the same end:
    DECLARE @hours TABLE (Fee_earner_Code int not null, startdate date not null, enddate date not null, hours decimal (17,2) not null)
    INSERT INTO @hours (Fee_earner_Code, startdate, enddate, hours) VALUES (1132,'2011-06-01','2020-01-01',6.00),(1132,'2011-06-07','2011-06-01',4.00),(1132,'2012-06-09','2011-06-07',12.00),(2345,'2011-06-01','2020-01-01',3.00),(2345,'2011-06-06','2011-06-01',9.00),(2345,'2012-06-10','2011-06-06',5.00)
    DECLARE @dates TABLE (Fee_earner_Code int not null, Primary_date date not null)
    INSERT INTO @dates (Fee_earner_Code, Primary_date) VALUES (1132,'2011-06-01'),(1132,'2011-06-02'),(1132,'2011-06-03'),(1132,'2011-06-04'),(1132,'2011-06-05'),(1132,'2011-06-06'),(1132,'2011-06-07'),(1132,'2011-06-08'),
    (1132,'2011-06-09'),(1132,'2011-06-10'),(1132,'2011-06-11'),(1132,'2011-06-12'),(2345,'2011-06-01'),(2345,'2011-06-02'),(2345,'2011-06-03'),(2345,'2011-06-04'),
    (2345,'2011-06-05'),(2345,'2011-06-06'),(2345,'2011-06-07'),(2345,'2011-06-08'),(2345,'2011-06-09'),(2345,'2011-06-10'),(2345,'2011-06-11'),(2345,'2011-06-12')
    ;WITH fixHours AS (
    SELECT h.*, DATEADD(DAY,-1,h1.startdate) as realEndDate
    FROM @hours h
    INNER JOIN @hours h1
    ON h.Fee_earner_Code = h1.Fee_earner_Code
    AND h1.startdate = (SELECT MIN(startDate) FROM @hours WHERE h1.Fee_earner_Code = Fee_earner_Code AND h.startdate < startDate)
    SELECT h.Fee_earner_Code, d.Primary_date, h.hours
    FROM fixHours h
    LEFT OUTER JOIN @dates d
    ON d.Primary_date BETWEEN h.startDate AND realEndDate

  • 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

  • How to group data based on date

    In my program the internal table is returning several values based on date.
    for example for the first pernr in the image below  there are four records. i need to delete the first record which is between the dates 20 and 30 .
    and also i need to get the difference between the dates as the record 23 and 28  i need to get separate dates as 24, 25..28.

    I am not sure if I understood your question correctly.
    From what I have understood, you can use the following logic.
    This logic will move all the records from lt_fields2 to another table lt_fields1 with begda between 20 and 30 of any month, except for the first record. It will also move records for every date between begda and endda of each record.
    You can alter the logic based on your exact requirement.
    declare another table lt_fields1 like lt_fields2.
    data del_flag.
    data prev_month(2) type c.
    sort lt_fields by pernr begda.
    clear del_flag.
    loop at lt_fields2 into wa_fields where begda+6(2) GE 20.
    * Delete the first record having date greater than 20 in a month for each pernr.
       at new pernr.
            clear del_flag.
       endat.
       if begda+4(2) NE prev_month.
           clear del_flag.
      endif.         
        if del_flag is initial. 
            del_flag = 'X'.
            continue.  " This record will not be moved to the final internal table.
       endif.
    * Add records for each date between begda and endda.
       append wa_fields to lt_fields1.
       prev_month = begda+4(2)
       while wa_fields-begda LT wa_fields-endda.
             wa_fields-begda = wa_fields-begda+1.
             append wa_fields to lt_fields1.
       endwhile.
    endloop.

  • Update age group picklist based on value entered in date of birth

    Hi Gurus,
    Have a requirement where in user would enter the date of birth on a contact record and would like to populate another custom field called age group at the time of creating a new record.
    The condition is some what like
    Age
    1 – 20 Teens
    21-40 Young Adults
    41-60 Adults
    60 – 100 Seniors
    I have tried using the age field but problem is that age is populated only when the record is saved.
    Update the age group via workflow works fine but the saved record has to be modified before triggering the workflow. we would like to avoid the additional step of modifying the record
    Is there any option to calculate age based on the value entered for date of birth - something like DOB Year - current year before saving a record or via post default without using workflows.
    Thanks in advance,
    Arun

    Hi
    The answer is yes, using the post default functionlaity.
    take a look in the folowign example:
    IIf(ToChar(Timestamp(),'DD/MM/YYYY')- [<DateofBirth>] < 20,'20','30')
    You will need to make something like that, but replace the '30' with another IIf expression, and so on for the next interval.
    note that date of birth should be between suqare brackets [  ] (it is shown here with underline for some reason...)
    Good luck
    Guy
    Edited by: Shinshan on 08:45 30/12/2009
    Edited by: Shinshan on 08:46 30/12/2009
    Edited by: Shinshan on 08:47 30/12/2009
    Edited by: Shinshan on 08:47 30/12/2009

  • Hide Repeating Frames based on data value

    Hello,
    Wonderful forum. Hope someone out there can give us input on this one. We have a report where we would like to show a different layout depending on the data value from the master query. One layout occupies a full 8X11 page and the second layout occupies 1/3rd of a page. Is it possible to hide one reapeating frame and show the other based on data value? This would be a multiple page report and each page will have to take the correct payout depending on the value of the data in the row.
    I appreciate any input on this. Thanks
    Ravi

    Thanks for you input. I appreciate it.
    I am having a problem doing this. Let us say i have 2 differnt paper layouts. I want to show or hide one of the layouts based on a data value.
    The problem i am facing is that the 2nd instance of true value for showing the 1st layout is over lapping the 1st instance of the 2nd layout thus showing 2 layouts overlapping each other on the same page. I know this is confusing but i will attempt to give an example:
    page 1 shows - layout #1 only is showing based on result of data value. This is good.
    page 2 shows - layout #2 shows based on data value, but also the 2nd instace of layout #1 (what ever data record satisfies layout #1 rule) is also showing over layout #2. So both the layouts are jumbled up on 1 page.
    Essentially conditional formatting on layout #1 is not able to recognize that there is a 2nd layout taking its place and thus showing the layout #1 whenever it finds data which satisfies the condition on the 2nd page and so on..
    Any help is greatly appreciated.
    Thanks..

  • Timestamp data type on S[range C on E] constant value-based range windows

    Hello,
    My questiong is about how can we use timestamp value on S[range C on E] constant value-based range windows.
    I have a LotEvent which i should collect and sum lastQty data for last ten minutes of market time (sendDate)
    A normal [range 600] query does not work for me because i would like to use the exact time which data has been generated by the market (sendDate).
    Here is the event;
    public class LotEvent{
         private Double totalQty;
         private float lastQty;
         private String symbol;
         private String messageType;
         private Integer dataInterval;
         private String sendDate;
    send date is always in "MM-dd-yyyy HH:mm:ss" format.
    I have tried to use the following query but this gives an error;
    Invalid statement: "select symbol, sum(lastQty) as lastQty, 10 AS dataInterval
    +from lotInputChannel [range INTERVAL "0 0:0:15.0" DAY TO SECOND on >>sendDate<<]+
    group by symbol"
    Cause: Datatype char is not valid for value based windows
    Action: Use a valid datatype for value based windows>
    Here is the CQL;
    <?xml version="1.0" encoding="UTF-8"?>
    <wlevs:config xmlns:wlevs="http://www.bea.com/ns/wlevs/config/application">
    <processor>
    <name>lotProcTenMin</name>
    <rules>
         <query id="tenMin"> <![CDATA[select symbol, sum(lastQty) as lastQty, 10 AS dataInterval 
                from lotInputChannel [range INTERVAL "0 00:10:00.0" DAY TO SECOND on sendDate]
    group by symbol]]> </query>
    </rules>
    </processor>
    </wlevs:config>
    i have tried this cql after changing the sendDate data type to long which is the time in milliseconds value but it did not work.
    select symbol, sum(lastQty) as lastQty, 10 AS dataInterval
    from lotInputChannel [range INTERVAL "0 00:10:00.0" DAY TO SECOND on to_timestamp(sendDate)]
    group by symbol
    The query above does not work also when sendDate is a String in "MM-dd-yyyy HH:mm:ss" format
    At last i tried the following query with sendDate as time in milliseconds (long) value. It works! but i still would like to know how to use timestamp in S[range C on E] queries
    select symbol, sum(lastQty) as lastQty, 10 AS dataInterval
    from lotInputChannel [range *600000* on sendDate]
    group by symbol
    public class LotEvent{
         private Double totalQty;
         private float lastQty;
         private String symbol;
         private String messageType;
         private Integer dataInterval;
         private long sendDate;
    Could anybody please help me with this issue?
    Edited by: user8830791 on 01-Aug-2011 06:39

    It seems that you should configure the channel "lotInputChannel" as an application timestamped channel.
    You can do that as follows -
    - Have "sendDate" as a long and let its unit be milliseconds
    - Use the following child elements of <channel> for the "lotInputChannel"
    <wlevs:application-timestamped is-total-order="true">
    <wlevs:expression>sendDate*1000*1000</wlevs:expression>
    </wlevs:application-timestamped>
    The multiplication by 10^6 is required since the units need to be converted into nanos
    With this, you could use the query -
    select symbol, sum(lastQty) as lastQty, 10 AS dataInterval
    from lotInputChannel [range 10 minutes]
    group by symbol
    Of course, for the above to work, a requirement is that the value of "sendDate" is non-decreasing.
    That is if e1 is before e2 in the "lotInputChannel" then e1.sendDate <= e2.sendDate
    Edited by: Anand Srinivasan on Aug 2, 2011 6:57 AM

  • Loop through tables based on data dict values

    Hi,
    I working on an old v7.3.4 database that I'm not familiar with and I want to loop through the tables and count the occurrence of a field value based on table names i've retrieved from the data dictionary. None of the tables have relational keys defined.
    In a cursor I can loop thru all_tab_columns and load variables with the table, column names, and the datatype, but then I want to use these values in a second nested cursor to loop through each table found by the first cursor.
    When I do :
    Select var_colname from var_tabname
    i get
    The following error has occurred:
    ORA-06550: line 23, column 10:
    PLS-00356: 'V_TABNAME' must name a table to which the user has access
    ORA-06550: line 22, column 5:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 22, column 12:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 27, column 7:
    PL/SQL: SQL Statement ignored
    so it would seem I can't use a variable to substitute the table name in the 'from' clause. Does anyone know of a way round this ?
    Thanks in advance

    Hi,
    You will have to use dynamic sql to create your second cursor.
    DECLARE
         v_sql_query VARCHAR2(400);
         TYPE cur_typ IS REF CURSOR;
         c1 cur_typ;
         mYRec MyTable%rowtype;
    BEGIN
         v_sql_query := 'select * from MyTable';
         OPEN c1 FOR v_sql_query;
              LOOP
              FETCH c1 INTO mYRec;
                   EXIT WHEN c1%NOTFOUND;
                   EXIT WHEN c1%NOTFOUND IS NULL;
    /*processing here*/
              END LOOP;
         CLOSE c1;
    END;
    Regards

  • Restricting the Prompt Values based on Fact table data

    Hi,
    We need dashboard prompts in OBIEE reports that will fetch data from dimension tables. Our all dimensions are conformed dimension having joined with multiple fact tables.
    Because prompts are showing data from dimension table, it is showing all dimension data and few data might not present in the particular fact table that we have used in the report.
    For Example:
    We have one Calendar dimension table that has 20 years data that means all dates. Now we have two fact tables Fact1 and Fact2.
    In Fact1 we have records related to only 2007 Years data. And In Fact2 We have 2008 years data.
    Now We are creating two separate reports in two separate page in one dashboard where the prompt is same. That is Calendar date prompt.
    So In report1, The prompt will be Calendare and Result will be from Fact1. But as the calendar prompt from Calendar dimension, it showing all 20 years data though only 2007 years data is valie.
    Similarly for Report2, It is showing all calendar dates in the prompt where Fact2 is having 2008 year data.
    I want to show only 2007 years dates in the prompt for Report1 and 2008 years dates for Report2. That means I want to restrict prompt values based on the fact.
    It will be great if someone can suggest on this.
    Regards,
    SS

    Hi, I have a similar problem.
    I have two dimensions: time and customer.
    The two dimensions are joined into two Fact Table (Order, Forecast).
    I created a dashboard prompt with two selections: the first is the Year (time dimension) and the second is the Region (customer dimension) with the option "cosntraint."
    When I select a Year, not all Regions are shown, but only those that are present in one of two fact table for the year chosen. Which fact table?
    What criteria will limit the values of the Region?
    Thanks

  • X-axis values - Set values based upon constant date

    I am creating a line graph.   I am plotting based upon date/time.   I'd like to use a constant date across the x-axis.  IE 8:00, 8:15, 8:30.   Within the constant value there could be many points or no points.   For example there could be a point at 8:01, 8:02, 8:05 and then a point at 8:35.   Along the x-axis the label should remain constant at 8:00, 8:15...
    Any ideas?

    Hi,
    use the chart engine for creating your graph. When requiring a horizontal time axis you have to use the chart type TimeScatter.
    Download the SAP Chart Designer (SDN - Downloads - WebAS) and see the included pdf document that describes how to structure your data XML.
    Demo reports are GRAPHICS_GUI_CE_DEMO and GRAPHICS_IGS_CE_TEST.
    Regards, Kai

  • Restricting key figure based on - INPUT value or value in TRANSACTION data

    Hi fellow BWers, hope you can help with this report requirement.
    Manual input variable : 0CALMONTH.
    <b>Is it possible to restrict a key figure (0amount) like this on-the-fly: </b>
    If 0calmonth in input variable > 0calmonth in transaction data
       then restrict 0amount with 0calmonth from input variable
    else restrict 0amount with 0calmonth from transaction data
    It's a must-have requirement to do it 'on the fly', not in the ETL.
    Thanks very much,
    AG

    Thanks a lot, I get the idea
    In order to get the 0calmonth from the transaction data, i need to :
    1. display the lowest granularity in the rows (so that calmonth is unique)
    2. then use formula variable with replacement path on the infoobject 0CALMONTH to get the value from transaction data?
    Is this correct?
    If yes...since the user does not want the lowest granularity in the report, he wants result pr. profit center, this will happen if I take 'No display' on the characteristics :
    Profit center A ||  20
    Profit center A ||  30
    Profit center A ||  10
    Profit center B ||  15
    <b>Question</b> How do I get the total pr. profit center, despite having all the other characteristics (hidden) in the row?
    Thanks
    AG

  • Batch Determination based on date of consig recieve

    Hi,
    I am getting problem when i am trying to do manual batch determination in the outbound delivery.
    I have created a record in VCH1 based on customer/Material/Plant. In this i have maintained a sort rule also. what characteristaics i must use to make my batch determination based on customer consignment recieving date?
    If i go in MSC3n with Material, Plant and batch data then in the screen ( table MCHA, MCH1) onlt data available is for ERSDA, LAEDA  and LWEDT.
    In delivery when i click on batch determination button. my Sort rule is not automatically determined. So i have to maunally entered my soirt rule but at the same time my qty proposal in the same screen is 1 which is nothing but
    FORM CHMVS_001.
      DATA: lv_line TYPE kondh-chasp VALUE '1'.
      LOOP AT disqty.
        CHECK lv_line <= no_of_split.
        IF QUAN_TO_DIS > 0.
          IF DISQTY-AVAL_QUAN > QUAN_TO_DIS.
            DISQTY-QUANTITY = QUAN_TO_DIS.
          ELSEIF disqty-aval_quan > 0.
            DISQTY-QUANTITY = DISQTY-AVAL_QUAN.
          ENDIF.
          IF disqty-quantity > 0.
            quan_to_dis = quan_to_dis - disqty-quantity.
            MODIFY disqty TRANSPORTING quantity.
            ADD 1 TO lv_line.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM
    When i am taking characteristics LOBM_VFDAT for sort rule in Cu70 then i am not getting batch determination as i required even if i maintained Shelf expiry date in MSC3n.
    Please suggest where i must look into so that my batch determination would be based on date of consignment recieved.. currently if it s taking based on max qty available in MMBE.
    Regards
    Nitin

    I have already assigned sort rule in VCH1 but dont know which Characteristics i must assign for customer consignment stock on FIFO basis. Could you please tell me the characteristics for it which i must consider?
    LOMB_VFDAT i have already tried but its not working for me.
    Edited by: Nitin Agarwal on Oct 30, 2008 8:14 AM

  • Oracle Inventory: Inventory Value as on date Query

    Hi guys,
    We need to write a query to get inventory value based on a particular date, say '31-dec-2011' for certain auditing purposes. We can use historical transaction summary report for this purpose, however this report produces more than 800 pages for a single requirement.
    We were able to retrive the current inventory value using the following query
    SELECT SUM(moq.transaction_quantity*moq.item_cost) inv_cost
    FROM mtl_onhand_qty_cost_v moq
    WHERE organization_id = :p_org_id;
    Unfortunately none of our exercises from last couple of days fetch values anywhere near to the historical transaction summary report as on date inventory value for the above said cut off date.
    We tried the following query against mtl_material_transactions table
    Select sum(transaction_quanity*new_cost) inv_cost from mtl_material_transactions
    where organization_id = :p_org_id and
    trunc(transaction_date) > to_date(:p_date)+1 -- transaction value after '31-dec-2010' for example
    and then deducting value from second query from first query value...
    Please help
    Regards,
    raj

    Hi Sandeep
    I was able to run the API mentioned with before report trigger successfully, however cannot retrive any lines from cst_inv_qty_temp, cst_inv_cost_temp tables. I had gone through the API body and "assumes" this particular API repopulates the data each time when the report is submitted, identified by the unique session id.
    Would you comment?
    SET SERVEROUTPUT ON;
    Declare
    L_FCN_CURRENCY VARCHAR2(15);
    L_REPORT_NAME VARCHAR2(80);
    sql_stmt_num varchar2(5);
    l_exp_sub NUMBER;
    l_msg_count NUMBER;
    l_msg_data VARCHAR2(8000);
    l_return_status VARCHAR2(1);
    l_as_of_date VARCHAR2(30);
    l_cost number;
    wms_org_count NUMBER;
    pjm_org_count NUMBER;
    l_calculate_intransit NUMBER;
    l_cst_inv_val EXCEPTION;
    Begin
    BEGIN
    MO_GLOBAL.SET_POLICY_CONTEXT ('S', 111);
    END;
    CST_Inventory_PUB.Calculate_InventoryValue(
    p_api_version => 1.0,
    p_init_msg_list => CST_Utility_PUB.get_true,
    p_organization_id => 111,---:P_ORG_ID,
    p_onhand_value => 1,
    p_intransit_value => 1,
    p_receiving_value => 0,
    p_valuation_date =>to_date('2011/01/01 00:00:00','YYYY/MM/DD HH24:MI:SS'), -- to_date(:P_AS_OF_DATE,'YYYY/MM/DD HH24:MI:SS'),
    p_cost_type_id => NULL, --2, --:P_COST_TYPE_ID,
    p_item_from => NULL, --:P_ITEM_FROM,
    p_item_to => NULL, --:P_ITEM_TO,
    p_category_set_id => NULL, --:P_CATEGORY_SET,
    p_category_from => NULL, --:P_CAT_FROM,
    p_category_to => NULL, --:P_CAT_TO,
    p_cost_group_from => NULL,
    p_cost_group_to => NULL,
    p_subinventory_from => 'BBM-01', --:P_SUBINV_FROM,
    p_subinventory_to => 'BBM-01', NULL, :P_SUBINV_TO,
    p_qty_by_revision => 2, 'no'--:P_ITEM_REVISION,
    p_zero_cost_only => 2, 'no'--:P_ZERO_COST,
    p_zero_qty => 2, 'no' --:P_ZERO_QTY,
    p_expense_item => 2, 'no' -- :P_EXP_ITEM,
    p_expense_sub => 2, --'No', -- l_exp_sub,
    p_unvalued_txns => 2, --:P_UNCOSTED_TXN,
    p_receipt => 1,
    p_shipment => 1,
    x_return_status => l_return_status,
    x_msg_count => l_msg_count,
    x_msg_data => l_msg_data
    IF l_return_status <> CST_Utility_PUB.get_ret_sts_success
    THEN
    RAISE l_cst_inv_val;
    END IF;
    FND_MSG_PUB.count_and_get(
    p_encoded => CST_Utility_PUB.get_false,
    p_count => l_msg_count,
    p_data => l_msg_data
    IF(l_msg_count > 0)
    THEN
    FOR i in 1 ..l_msg_count
    LOOP
    l_msg_data := FND_MSG_PUB.get(i, CST_Utility_PUB.get_false);
    DBMS_OUTPUT.PUT_LINE(i ||'-'||l_msg_data);
    END LOOP;
    END IF;
    End;

Maybe you are looking for

  • DVD drive died - l need to reinstall XP Satellite A105

    Hi everyone, My wife went on vacation to Hawaii, and while she was gone, her Satellite A105 (no longer under warranty with a dead DVD drive) started malfunctioning to the point where XP where freeze on boot. I tried everything I could but it wouldn't

  • Error 42408 when syncing my iphone 4 with itunes, how can this be fixed..??

    Ive recently downloaded the new itunes version 10.5, but now when i plug my iphone into my pc (Vista) i get error 42408 and messages saying that my mobile hasnt been started by my network provider, also requesting that I need to set my iphone back to

  • New document alert: How to get PDF documents into Adobe Reader for iOS

    Opening PDF Files in Reader for iOS (iPhone and iPad) has been very helpful to many users of Adobe Reader for iOS.  However, Apple has drastically changed the user interface in iOS 7, which made the original document obsolete.  According to Apple Dev

  • The wifi turned off on mine

    the wifi turned off on my husbands & my ipods, when we try to sign back in it says, "unable to join the network."   the wifi is still working on our laptop & tv,  what can we do to fix it?  We have already tried to rebooy our ipods, turned the wifi o

  • How to find a Region id/name from a JTT jsp page

    Hi, i am on a SR details page , which i think is , ibuSRDetails.jsp in Isupport. How do i find which region it is belongs to ? I wanted to find out the region id /name so that i can customize the region. thansk -mahendra