Max date related to Max value in OBIEE answers

Hi,
I have one requirement in answers where in which i have to show the data with following columns
My table structure is Account Number, date, Balance
My report structure is Account Number, Max balance, Max balance Date, Balance as on start date, Balance as on end date.
I have to provide a adhoc date filter, where in which user has the option to select the start date and end date.
user wants the report in same format
Can any one please let me know how to handle this in OBIEE 10.1.3.4 Answers.
Thanks
Krishna

Hi Deva,
But i tried with a simple scott RPD. It has two tables DEP and EMP. In the criteria section i dragged and dropped 4 columns. DEPNO, DNAME, ENAME AND SALARY. And in the criteria filter section, i added the column "DNAME" and chose the static filter as "ACCOUNTING". when i clicked on the results tab. It displayed the results related to DNAME-ACCOUNTING. After that, I created a dashboard_Prompt in which i chose the column prompt and the column as DNAME and the condition i gave is - equal to. In the Dashboard section, I dragged and dropped both the Dashboard_Prompt and Analysis. In the Dashboard, in Dashboard_Prompt section is chose the value "RESEARCH". Now the default analysis that was displaying the results related DNAME-ACCOUNTING changed and filtered the data related to DNAME-RESEARCH.
By this experiment, I guess giving static value in criteria and changing it in the Dashboard_prompt will work. Is it right?
Thanks
Thenmozhi

Similar Messages

  • How to send a list item value to URL to open data related to item value

    Hi,
    Iam using Apex4.0 and iam facing some problem. Iam unable to send selected list item value to the url specified in the HTMl region.
    Here i want to open the data related to list item value in other page.
    List item - :Familyp
    i want to pass this selected value to the url and when ever user selected the list item and clicks on the url, then it should display the item value related data in new page.
    I tried with &FamilyP in url but it's not working. Any one help me plz.
    Regards
    Vamsi.Tata

    Is it a normal Select list or Multi Select list?
    If you have select list that allows you to select multiple options then you cannot pass it through URL. Multi-select /Shuttle keep colon separated list in the item, and this confuses Apex because the Apex URL uses colons for a different purpose. No escaping or URL encoding will help.
    If it is normal select list that allows selection of only one option then you can pass through the url. Unless of course the data has a colon in it.
    For multi-select, and when the value contains colon, the only way is to save the value in session state, same page item or any other place like Application Item, and then reference it at the other end. Never pass through the URL.
    Regards,

  • Bringing Duplicate values in OBIEE Answers report

    Hi Experts
    Need you advise on the below:
    I need to bring the duplicate rows in obiee11g report. I have a seq. generator which makes the complete row unique.
    But the problem is Business User doesn't want to bring that column in report and then hide it.
    I also unchecked "DISTINCT SUPPORTED" plus few more parameters in teh DB properties but no help.
    Pls. guide how to achieve it on rpd level so that user doesn't have to drag the column to get duplicate rows.
    Appreciat any guidance.

    Hi
    I tried the solution but it didn't work .
    These 9 records come when I don't bring the unique identifier in the report request
    2013     November     FirstNameA     LastNameA     1851
    2013     November     FirstNameB     LastNameB     V594
    2013     November     FirstNameC     LastNameC     1851
    2013     November     FirstNameD     LastNameD     V594
    2013     November     FirstNameE     LastNameE     V594
    2013     November     FirstNameG     LastNameG     1851
    2013     November     FirstNameH     LastNameH     1851
    2013     November     Samuel     Ian     1775
    2013     November     Sandra     David     1775
    These 10 records come when I bring the unique identifier in the report request . See for - FirstNameE     LastNameE
    The user wants to see both the rows without actually dragging the unique identifier.
    2013     November     16     Sandra     David     1775
    2013     November     17     FirstNameA     LastNameA     1851
    2013     November     18     FirstNameB     LastNameB     V594
    2013     November     19     FirstNameC     LastNameC     1851
    2013     November     20     FirstNameD     LastNameD     V594
    2013     November     21     FirstNameE     LastNameE     V594
    2013     November     22     FirstNameE     LastNameE     V594
    2013     November     23     FirstNameG     LastNameG     1851
    2013     November     24     FirstNameH     LastNameH     1851
    2013     November     25     Samuel     Ian     1775

  • OBIEE- Calculating Min and Max Values

    Hi Friends,
    I have an Issue with regards to calculating Min/Max Values.
    In my Data base we dont have Message Count. So we created a Logical column in BMM Layer called "Message Count" based on the column "Out/In No" i.e by creating count of it i.e (Count(out/in no)) in BMM
    To calculate Inbound Messages we writing -- filter(Message count using messagetype ='i') at report level
    To calculate Outbound Messages we writing -- filter(Message count using messagetype ='o') at report Level
    To calculate Total Messages we writing----- "Message Count".
    But Now we had an issue to calculate "Min Inbound/Max Inbound/Min Outbound/Max Outbound/Avg In/Avg Out" types of Messages.
    To make it clear definition for MIN and MAx is Like This.
    Say Ravi received(Inbound) messages      2
    Say Roy received(Inbound) messages      5
    Say Kiran received(Inbound) messages   11 on a particular date.
    So for that particular date Min Inbound is 2
    So for that particular date Max Inbound is 11
    and Avg Inbound will be (2+5+11)/3
    On this basis we have to implement it in OBIEE. For any more clarifications please reply to my thread.
    Please reply to my Issue ASAP as it is critical and I am out of time.
    Thanks in Advance.
    Regards

    Hi,
    Do you mean to ask minimum stock in a plant and maximum stock in  a plant over a period of time?
    Due to receipts stocks flows in to the storage location of a plant. May be in one period there will be less stock or in one period there will be maximum stock.
    May be history tables like MBEWH or MARDH or the report MC.9 ( you need to provide the period as input) etc for your case.If this is  not your requirement please reply back.
    Regards

  • Need help regarding complex calculation using Max value and limiting data after Max date in MDX

    I am working on a bit complex calculated measure in SSAS cube script mode.
    Scenario /Data Set
    Date
    A
    B
    C
    A+B
    5/29/2014
    Null
    34
    Null
    34
    6/30/2014
    Null
    23
    45
    68
    7/15/2014
    25
    -25
    Null
    0
    8/20/2014
    -34
    Null
    Null
    -34
    9/30/2014
    25
    Null
    60
    25
    10/15/2014
    45
    -45
    Null
    0
    11/20/2014
    7
    8
    Null
    15
    a) Need to capture latest non-null value of Column C based on date
    with above example it should be 60 as of 9/30/2014
    b) Need to capture column A+B for all dates.
    c) Add values from column (A+B) only after latest date which is after 9/30/2014. 
    with above example it's last 2 rows and sum is 15
    d) Finally add value from step a and step c. which means the calc measure value should be = 75
    I need to perform all this logic in MDX. I was able to successfully get step a and b in separate calc measure, however i am not sure how to limit the scope based on certain date criteria. In this case it's, date> Max date(9/30/2014) . Also how should
    i add calculated members and regular members?
    I was able to get max value of C based on date and max date to limit the scope.
    CREATE MEMBER CURRENTCUBE.[Measures].[LatestC] AS
    TAIL( 
      NONEMPTY(
        [Date].[Date].CHILDREN*[Measures].[C]),1).ITEM(0) ,visible=1;
    CREATE MEMBER CURRENTCUBE.[Measures].[MaxDateofC] AS
    TAIL( 
      NONEMPTY(
        [Date].[Date].CHILDREN,[Measures].[C]),1).ITEM(0).MemberValue ,visible=1;
    Please help with Scope statement to limit the aggregation of A+B for dates > MaxDateofC? Also further how to add this aggregation value to LatestC calc measure?
    Thank You

    Hi Peddi,
    I gave TRUNC to both of the dates. But still the same issue. I think the problem is in returning the BolbDomain.
    return blobDomain;
    } catch (XDOException xdoe) {
    System.out.println("Exception in XDO :");
    throw new OAException("Exception in XDO : "+xdoe.getMessage());
    catch (SQLException sqle) {
    System.out.println("Exception in SQL :");
    throw new OAException("SQL Exception : "+sqle.getMessage());
    catch (OAException e) {
    System.out.println("Exception in OA :");
    throw new OAException("Unexpected Error :: " +e.getMessage());
    Thanks and Regards,
    Myvizhi

  • Need to sum max values in a report with Hidden groupings

    I have looked all over and have not found my exact situation, so I am posting my first question.  I have a report that I have grouped on multiple levels.  So my report has a customer/header/detail/release grouping.  I have written a custom
    expression so that only a single value, which is the max value in the group, is shown in the detail, with all values showing in the release.  I have then set my visibility toggle to toggle on header, then detail, then release and I need to sum up those
    max values into a field on the report.  The custom expression that I have written works correctly when you are showing on the detail level.  It gives the correct value, which is the max value in each release.
    What I then need the report to do is to sum only that max value and roll that up into the header group, so that I get a total of the max values.  
    I have tried using the MAX function in my expression to get the correct max value, but I cannot get SSRS 2008 R2 to sum that, and I have tried writing a custom expression that will calculate the max (Non-zero values divided by number of non-zero records) and
    both ways work correctly until I try to rollup and sum to the next group level.
    I have also tried using a group variable and custom code to get the value and save it to a variable, but I have not had any luck in setting or getting that value correctly back to my report.
    At its most basic it feels like I should be able to set a Sum(Max(Fields!ValueColumn.Value) and let SSRS handle how that should be broken out, but after trying that repeatedly I have still had no luck.  I cannot adjust the SQL as I need the level of detail
    that the report shows, although I could add more fields as long as I don't add any groupings or totals that would reduce the granularity of that data being returned.
    Any new avenue to explore would be very helpful.
    Thank you in advance,
    Chad
     

    Ok, after continuing to search the internet I finally found the extra piece that I was missing that gave me the results I needed. The new expression looks like this:
    =runningvalue(Sum(Max(IIF(LEFT(Fields!JobNum.Value,1)="S" AND Fields!Week1STol.Value<>0, CDBL(Fields!Week1STol.Value), 0),"JobItem"),"JobItem"),SUM, "JobItem")
    In this I wrapped the original expression of Max in both a Sum and a runningvalue both at the JobItem level to get this rollup value. Now when I open the grouping I get the correct running value at each level.
    What this really gives to me is a running total at each of four groupings, even with a "max" value at the detail level. This also allows me to total a max value inline on the report, without needing a hidden row, or report footer.
    Thank you to everyone who looked at this, I hope it helps someone else. If this answer is not clear enough, please don't hesitate to add to the comments and I will try to clarify.
    Thank you, Chad

  • How to get the max value of a set of percentage values?

    Hi,
    I've tried to get the max and min value of a set of calculated percentage values. Such as
    Jan Feb March Apr May Jun    Min  Average   Max
    0,5 0,8  1,1      0,4 1      0,6     0,4   0,7         1,1
    The average value works fine. But with "min" and "max" I have a problem.
    I've tried to get the value with the following ways:
    - Create a new calc. keyfigure and make a sum of all values: (Jan + Feb + ...) and set the calculation in key figure properties to Min/Max.
    - Create a new calc. keyfigure and make a sum of all values and set the aggregation to Min/Max
    - Create a selected keyfigure with a filter to the necessary periods and set a calculation to Min (Aggregation is not possible here)
    - Create a new cal. keyfigure with all periods and the function Min. e.g. min(Jan, (min Feb, (min (....)
    None of this solutions provides the right min and max value. When I use an amount value (e.g. Euro) instead of these percentage values the keyfigure with the min and max function works. The others all provide wrong values.
    Is there a solution to get the right min and max value???
    It would be a great help when you have any hints.
    Thanks
    Claudia

    Hi Aduri,
    thanks for your answer but your solution doesn't work.
    The problem is that the periods are defined in a structure with offsets such as
    - period-11
    - period-10
    - period
    in this structure elements there is also the keyfigure "netvalue" defined.
    In the rows of the report there is another characteristic such as company code.
    Is there a solution to find the max and min values of the period values for each company code? Or must I change the data model e.g. copy the keyfigure and make a new keyfigure with another aggregation level?
    Thanks for any hints!
    Claudia

  • Need sum on all coulumns except for one coulumn needs max value

    Hi Gurus,
    I have a requirement like:
    Say I have 3 columns like C1,c2,c3.
    On day1 the record values are 100,150,200
    On day2 the record values are 100,150,300
    End result ..for column C1 and C 2 I should get sum of them
    so the result for C1 as per the above values: 200
    c2=300
    But for C3 column, I should get only maximum value..like 300 (not sum)...
    Using case statement by setting a flag on max report date.. we can do this ..Is there any other that this can be achieved. (In ETL or RPD or Front end)
    Thanks.

    For C3 column instead of showing all values like 200, 300 just show max value only so that you can get output as below and when you sum the value remain 300. Try it out. It can be in rpd or in the report.
    On day1 the record values are 100,150,300
    On day2 the record values are 100,150,300
    mark if make sense
    Thanks

  • SSAS Tabular DAX- Need to get MAX value of the MIN (top)hierarchy level row

    EDIT:
    I got closer to resolving the issue using MAX. 
    However, If I remove the department hierarchy and just place on the MAX measure I get the single largest value out of all departments. 
    It would be ideal if the measure could still SUM the "top level" values across everything in the system if the hierarchy is not placed on the rows grouping.
    So it returns the largest value for a given department, but if the department hierarchy isn't present I need it to return a SUM of all the level 1 values for all departments...
    Basically return MAX value from the MIN L1ID's DeptLevel value, but I can't seem to construct that DAX query.  So if DepartmentID hierarchy is on display it gets MAX per row, but if that is removed it dips into MAX GoalValue for each L1ID grouping with
    the MIN DeptLevel.
    /EDIT
    I have a rather odd data table I'm bringing into a SSAS Tabular model.
    Instead of having all data at each child level and then it adding up to a grand total in the parent, it has a grand total predefined at each child level.
    I just need this tool to display the raw data if at all possible instead of trying to aggregate everything. Filter on active level, ignore child levels.
    Is there a way to do that?
    Example:
    SalesGoalsByDepartmentLevel:
    Level1 (top level) = 5,000
    Level2( lower level) = 0
    Level3(lower still) = 500
    Level 4(lowest) = 4,250
    So note that adding up all the child levels is still $250 shy of the top 5,000.
    IT is just an odd business rule, basically each level is expected to meet that goal or exceed it, the top level goal is 5,000 but management doesn't care where that last 250 comes from, they do are that each defined level is met.
    These levels are in a hierarchy so if I view the top level of the hierarchy it adds up to 4250+500+5000=9750 when I just want to see 5,000 at the top level and the details when they drill down.
    I added a filter to just filter to the top level, but then when I drill down of course those lower levels are blank.
    Is there a way to filter on the current displayed level without aggregating all child levels?
    Thanks!

    You might want to take a look at the Parent-Child Hierarchies pattern here:
    http://www.daxpatterns.com/parent-child-hierarchies/
    You might write DAX code to check what is the "current" level (see BrowseDepth measure in the sample file you can download) and depending on its level, se the filter to blank to all the levels below, so you don't aggregate "children".
    Just an idea, I'm not sure if it corresponds to your requirement and I don't have time to make more tests.
    I hope it will be helpful.
    Marco Russo (Blog,
    Twitter,
    LinkedIn) - sqlbi.com:
    Articles, Videos,
    Tools, Consultancy,
    Training
    Format with DAX Formatter and design with
    DAX Patterns. Learn
    Power Pivot and SSAS Tabular.

  • Range Partitioning a table. Max value to be defined

    Hi,
    I am using a range partitioned table, range partitioned on date, and have defined max value as 6 months after the Creation Date.
    I have a proc which creates the partitions I want in advance by splitting up the max partition.
    - Now what do I do when max partition is reached after 6 months?
    - If I define max partition one year or two year after the current date instead of the currently defined 6 months after creation date. What are the negatives attached with it?
    I can't use Interval Partition and have to use Range only.
    Kindly suggest.
    Thanks..

    >
    I am using a range partitioned table, range partitioned on date, and have defined max value as 6 months after the Creation Date.
    I have a proc which creates the partitions I want in advance by splitting up the max partition.
    - Now what do I do when max partition is reached after 6 months?
    - If I define max partition one year or two year after the current date instead of the currently defined 6 months after creation date. What are the negatives attached with it?
    >
    Any data with a partition key that does NOT match any partition will cause your INSERT query to fail.
    Any partition that has no data to match it will simply remain empty.
    A common partitioning scheme is to define one partition for all old data, one partition with a high max value and then split the max value partition to get the partitions you want in the middle.
    Let's say you want monthly partitions but don't have that much data from before the current year, 2012.
    1. Create one partition for dates < 1/1/2012
    2. One partition each for the 12 months of 2012
    3. One max value partition to be 1/1/4000
    You would just split the max value partition to create each month of 2013. The split could be done ahead of time or a month at a time as you choose.
    The only negative is that any data inserted by mistake that has a super-high date will go into the max value partition. But that is going to happen anyway. If you accidentally enter a date of 3/23/3882 it won't be rejected.
    But it is easy to query periodically to see if you have any 'bad' data like that. And the alternative is that an INSERT would fail because of the one bad record and all of your good data would be rejected anyway so it's not really much of a negative.
    Remember - for best management performance each partition should have its own tablespace and the indexes should all be local if possible.

  • Query to print the max value of time of the latest record from table

    hi
    i wrote this query
    which should return max fx_time of the latest or current value of fx_date
    plz help
    this wuery is giving current date fx_date but with all values not the max value of fx_time.
    select FX_DATE, FX_TIME,FROM_CURRENCY, TO_CURRENCY, ASK_RATE, BID_RATE,
    time_stamp, source,
    DESCRIPTION, FX_TYPE, OVERRIDDEN_RATE, OVERRIDDEN_BY, OVERRIDDEN_DATE ,
    ASK_RATE_INVERSE, BID_RATE_INVERSE, PX_LAST, PX_MID, PX_OPEN, PX_HIGH,
    PX_LOW,NY_TIME_OF_LAST_PRICE_UPDATE,
    DATE_OF_LAST_UPDATE, PX_BID_AM, PX_ASK_AM, PX_BID_PM, PX_ASK_PM, PX_CLOSE_1D,
    CHG_NET_1D,
    CHG_PCT_1D, PRICING_SOURCE, PX_BID_1M, PX_ASK_1M, PX_BID_1YR, PX_ASK_1YR,
    PX_CLOSE_MTD,
    PX_CLOSE_YTD, FXOPT_COMMODITY_CCY, FXOPT_SPOT_FXRATE, SPOT_RT_USD_FLAG,
    PRIOR_CLOSE_BID,
    PRIOR_CLOSE_MID, PRIOR_CLOSE_ASK from CURRENCY_EXCHANGE_TXN
    WHERE
    source='BLOOMBERG'
    AND FX_DATE=
    (select max(fx_date) JIM from CURRENCY_EXCHANGE_TXN
    ,(select max(fx_time) TIM from CURRENCY_EXCHANGE_TXN GROUP BY FX_TIME )
    what change should i do

    Hi,
    Try this:
    select FX_DATE, FX_TIME,FROM_CURRENCY, TO_CURRENCY, ASK_RATE, BID_RATE,
    time_stamp, source,
    DESCRIPTION, FX_TYPE, OVERRIDDEN_RATE, OVERRIDDEN_BY, OVERRIDDEN_DATE ,
    ASK_RATE_INVERSE, BID_RATE_INVERSE, PX_LAST, PX_MID, PX_OPEN, PX_HIGH,
    PX_LOW,NY_TIME_OF_LAST_PRICE_UPDATE,
    DATE_OF_LAST_UPDATE, PX_BID_AM, PX_ASK_AM, PX_BID_PM, PX_ASK_PM, PX_CLOSE_1D,
    CHG_NET_1D,
    CHG_PCT_1D, PRICING_SOURCE, PX_BID_1M, PX_ASK_1M, PX_BID_1YR, PX_ASK_1YR,
    PX_CLOSE_MTD,
    PX_CLOSE_YTD, FXOPT_COMMODITY_CCY, FXOPT_SPOT_FXRATE, SPOT_RT_USD_FLAG,
    PRIOR_CLOSE_BID,
    PRIOR_CLOSE_MID, PRIOR_CLOSE_ASK from CURRENCY_EXCHANGE_TXN
    WHERE
    source='BLOOMBERG'
    AND FX_DATE=
    (select max(fx_date) JIM from CURRENCY_EXCHANGE_TXN
    FX_TIME )
    [PRE]
    Please always use [ PRE ]  and [ / PRE ] tags when ever posting any code.
    Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Max value is same in report

    Hi Sap Experts
    I am not getting same min value from max can anyone correct my program please
    I am getting max value but in place of min I am getting the same value of max.
    I am searching with equipment range , monthly date range and unit of measurment (km,L,H)
    REPORT Z_ESLP_FUEL LINE-SIZE 200 LINE-COUNT 75
    NO STANDARD PAGE HEADING.
    TABLES : equi,
    equz,
    imptt,
    imrg,
    eqkt,
    iloa.
    Type Declaration
    TYPES: BEGIN OF ty_data ,
            equnr type equnr, " Euipment no
            eqktx type eqkt-eqktx, " Equipment Text
            eqfnr type iloa-eqfnr, " Equipment Sort field
            idate type imrg-idate, " Measuring Date
            recdu type imrg-recdu, " Unit of measuring ='KM','L','H'
            recdv type imrg-recdv, " Counter reading data
          END OF ty_data.
    TYPES: BEGIN OF ty_final,
            equnr type equnr, " Equipment no
            eqktx type eqkt-eqktx, " Equipment Text
            eqfnr type iloa-eqfnr, " Equipment Sort field
            min_date type imrg-idate, " Min Date
            min_km type p decimals 2, " Max Km
            max_km type p decimals 2, " Min km
            t_max_min_km type i, " Total min_km-max_km
            max_date type imrg-idate, " Max Date
            min_hr type imrg-recdv, " Max hr
            max_hr type imrg-recdv, " Min hr
            t_max_min_hr type i, " Total min_hr-max_hr
            min_lit type imrg-recdv, " Max lit
            max_lit type imrg-recdv, " Min lit
            t_max_min_lit type i, " Total min_lit-max_lit
            fuel_con type p decimals 2, " Total_hrs / t_max_min_hr
            km_l type p decimals 2, " km / L
            lit_per_hr type i , " fuel comsumed / t_max_min_hr
          END OF ty_final.
    DATA: i_data TYPE TABLE OF ty_data, " internal table
          wa_data TYPE ty_data, " work area
          i_final TYPE TABLE OF ty_final, " internal table
          wa_final TYPE ty_final. " work area
    data: begin of itab occurs 0,
    num type i,
    end of itab.
    data: v_min_1 type i,
    v_max_1 type i,
    min like imrg-recdv,
    max like imrg-recdv,
    max_dt like imrg-idate,
    min_dt like imrg-idate,
    t_ma_mi type p decimals 2,
    V1 LIKE  IMRG-RECDV  ,
    V2 LIKE IMRG-RECDV  .
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: p_equnr FOR equi-equnr ,"no-extension no intervals,
    p_idate FOR imrg-idate, "NO-EXTENSION NO INTERVALS OBLIGATORY,
    p_recdu FOR imrg-recdu. "NO-EXTENSION NO INTERVALS default 'M3'" OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
    SELECTION-SCREEN END OF BLOCK blk2.
    SELECTION-SCREEN END OF BLOCK blk.
    TOP-OF-PAGE.
      FORMAT INTENSIFIED ON.
      WRITE:/1(40) ' INVESTMENT LIMITED '.
      WRITE:/50(40) ' FUEL CONSUMPTION REPORT ' CENTERED ,
      2 'Page', sy-pagno.
      FORMAT INTENSIFIED OFF.
      WRITE:/50(40) '----
    ' CENTERED .
      FORMAT INTENSIFIED ON.
      WRITE:/2 sy-datum COLOR 3, sy-uzeit .
      "WRITE:/1 S903-SPMON ."p_yearf.
      ULINE.
      "CENTERED.
      write: /2 'Date From :'.
      write: /2 'Equipment No :'.
      write: /2 'Unit :'.
      SKIP.
      ULINE.
      WRITE:/1 sy-vline,
      2 'EQUIP NO', 10 sy-vline,
      11 'NAME', 40 sy-vline,
      41 'min date', 50 sy-vline,
      51 'max date', 60 sy-vline,
      61 'min km', 70 sy-vline,
      71 'max km' , 80 sy-vline,
      81 't_max_min_km', 90 sy-vline,
      91 'min hr', 100 sy-vline,
      101 'max hr', 110 sy-vline,
      111 't_max_min_hr' , 120 sy-vline,
      121 'min lit', 130 sy-vline,
      131 'max lit', 140 sy-vline,
      141 't_max_min_lit', 150 sy-vline,
      151 'fuel con', 160 sy-vline,
      161 'km_l', 170 sy-vline,
      171 'lit_per_hr', 180 sy-vline.
      FORMAT COLOR 3 ON.
      ULINE.
    END-OF-PAGE.
    START-OF-SELECTION.
      select aequnr deqktx feqfnr eidate erecdu erecdv
      into table i_data
      from equi  AS a
      inner join equz as b
      on aequnr = bequnr
      inner join iloa as f
      on biloan = filoan
      inner join imptt as c
      on aobjnr = cmpobj
      inner join eqkt as d
      on aequnr = dequnr
      inner join imrg as e
      on epoint = cpoint
      where a~equnr in p_equnr
      and
      e~idate in p_idate
      and
      e~recdu in p_recdu.
        LOOP at i_data into wa_data.
             SORT i_data BY  equnr idate descending .
             "Read table i_data into wa_data index 1.
               move wa_data-recdv to max.
             SORT i_data BY  equnr idate ASCENDING .
            "Read table i_data into wa_data index 1.
               move wa_data-recdv to min.
         on change of wa_data-equnr.
         write:/ wa_data-equnr, wa_data-eqktx ,wa_data-eqfnr ,wa_data-idate ,wa_data-recdu ,
         'MIN',max EXPONENT 0 DECIMALS 2,
         'MAX',min EXPONENT 0 DECIMALS 2.  .
         endon.
        endloop.
        loop at i_data into wa_data.
        SORT i_data BY  equnr idate descending .
        move wa_data-recdv to max.
        endloop.
        loop at i_data into wa_data.
        SORT i_data BY  equnr idate ascending .
        move wa_data-recdv to min.
        endloop.
    regards
    Piroz

    Hi Experts
    I got the result but it is dividing in two lines one for max and another for min but I want the sub total subtraction after each max and min
    max   192300.00
    min    182139.00
    ========================
    max-min = 10161.00
    ========================
    max   649209.00
    min    642962.00
    ========================
    max-min = 6247.00
    ========================
         SORT i_data BY equnr idate descending .
    loop at i_data into wa_data.
            max = wa_data-recdv.
            min = wa_data-recdv.
    at new equnr.
            read table i_data into wa_data index sy-tabix.
            write:/ wa_data-equnr, wa_data-eqktx ,wa_data-eqfnr ,wa_data-idate ,'max',max EXPONENT 0 DECIMALS 2,wa_data-recdu .
            endat.
    at end of equnr.
            read table i_data into wa_data index sy-tabix.
            write:/ wa_data-equnr, wa_data-eqktx ,wa_data-eqfnr ,wa_data-idate ,'min', min EXPONENT 0 DECIMALS 2, wa_data-recdu .
    on change of wa_data-equnr.
    t_ma_mi = max - min.
    write:/ t_ma_mi.
    endon.
    endat.
    at end of equnr.
    SUM.
    write:/ '----
    endat.
    endloop.
    regards
    Piroz

  • ?(Start) Routine to fill a flag for all Y_ID_i where X_IDij is max value

    Just one sentence: How can i write a routine to fill an infoObject with value "X", for the max value key_id X_IDij of every foreign key Y_ID_i.
    > More explanation------>
    I have such data rows in cube with main keys Xi and foreign keys Yi, characteristic Ci
    row1: X1   Y1  C1
    row2: X2   Y1  C2
    row3: X3   Y1  C3
    row4: X4   Y2  C4
    row5: X5   Y2  C5
    row6: X6   Y2  C6
    row7: X7   Y3  C7
    row8: X8   Y3  C8
    row9: X9   Y3  C9
    I want to display in the query for every foreign key Yi the once row with max Xi: Max from (X1, X2, X3); Max from (X4, X5, X6)..
    Those rows that will be displayed in query are row3, row6 and row9 because by Y1, X3 is the maximal value, for Y2 is X6 and for Y3 is X9. 
    How can i select those row in the query. So that, only one row (with max X) is diplayed for every foreign key.
    Thanks for helping.
    Arnaud
    Edited by: Arnaud on Aug 18, 2009 7:00 AM
    Edited by: Arnaud on Aug 18, 2009 1:17 PM
    Edited by: Arnaud on Aug 27, 2009 9:45 AM

    Hi Arnaud,
    You can use the below code in your start routine -
    DATA : IT_TAB TYPE DATA_PACKAGE OCCURS 0.
    IT_TAB[] = DATA_PACKAGE[].
    SORT IT_TAB BY Y DESCENDING X.
    DELETE ADJACENT DUPLICATES FROM IT_TAB COMPARING Y X.
    LOOP AT DATA_PACKAGE.
      READ TABLE IT_TAB WITH KEY X=DATA_PACKAGE-X
                                                          Y=DATA_PACKAGE-Y
                                                          Z=DATA_PACKAGE-Z
                                             BINARY SEARCH.
      IF SY-SUBRC EQ 0.
        DATA_SOURCE-FLAG = 'X'.
        MODIFY DATA_SOURCE.
      ENDIF.
    ENDLOOP.
    Here we are assuming that your data package contains the additional field FLAG.
    Regards,
    Saurabh

  • [svn:fx-trunk] 12552: DataGroup now tracks the indices of the active virtual item renderers with a list , rather than the min/max values.

    Revision: 12552
    Revision: 12552
    Author:   [email protected]
    Date:     2009-12-04 13:45:12 -0800 (Fri, 04 Dec 2009)
    Log Message:
    DataGroup now tracks the indices of the active virtual item renderers with a list, rather than the min/max values. 
    DataGroup/addItemRendererToDisplayList() now respects the overlay.
    QE notes:
    Doc notes:
    Bugs: sdk-24052
    Reviewer:
    Tests run: DataGroup, List
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/sdk-24052
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as

    Hello Martin:
    Thanks for your input.  However I am not certain we have resolved this issue adequately, or understand the principles governing the css as regards this spry menu framework 2.0 (1.0).
    For example, the menu only works in IE 6.0 if the css remains in the head.  I agree with your original post that it shouldn't make any difference whether the css is posted in the head or in a separate style sheet (so long as specificity issues are addressed).  Both should work -- and yet it doesn't.
    If the CSS is placed in the separate style sheet governing the total site, it doesn't work for 6.0.  If placed at the top of the style sheet, conflicts of specificity prevent the menu from rendering properly in any of the browsers causing the rules for general links to govern the menu.   This has been verified using a cross browser testing.  If the styles are placed at the bottom of the style sheet to help them take precedence, they work in all the browsers except for IE 6.
    The website I am building needs to support IE 6 for a variety of reasons, and because it is catering to the non-profit community and to low income persons, I am mindful of even small differences in page weight.
    So for me, at least, the issue remains baffling.
    I appreciate your input, but also would appreciate the input from others, and especially Adobe Community Professionals and employees.  The spry framework in this regard is not well documented.  I am not certain if this is exclusively a CSS problem, if it might also be complicated by the architecture of the spry framework, or if indeed other variables are at play.
    I would be my hope that in resolving the problem, other users of the this particular spry framework might also benefit.
    Thanks,
    Steve.

  • Finding the max value using partition by

    Hi
    I've the following requirement where i need to select the max value from the data
    WITH T AS
    (SELECT 48003 ID ,'SPR' RTNG_TP_CD , 'INS' RL_CD ,'A-' RAT_CD FROM DUAL UNION ALL
    SELECT 48003 , 'SLNG' ,'INS','A-' FROM DUAL)
    SELECT distinct  ID, RTNG_TP_CD,RL_CD,MAX(RAT_CD)  over (partition by id) RT_CD
    FROM T
    For a single id if there are 2 RTNG_TP_CD then select the max(rat_cd) by displayin rtng_tp_cd =SLNG
    Expected Output
    48003 , SLNG , INS , A-Thank You

    WITH T AS
    (SELECT 48003 ID ,'SPR' RTNG_TP_CD , 'INS' RL_CD ,'A-' RAT_CD FROM DUAL UNION ALL
    SELECT 48003 , 'SLNG' ,'INS','A-' FROM DUAL)
    SELECT distinct ID,decode((select count(*) from t where id=t.id),1,RTNG_TP_CD, 'SLNG') RTNG_TP_CD,RL_CD,MAX(RAT_CD) over (partition by id) RT_CD
    FROM T

Maybe you are looking for

  • Best solution for customers to edit InDesign files within a browser????

    I have done a lot of research of some of the companies out there now that do this (one2edit, wealledit, chilli publishing, etc.) and none are really what we are looking for.  To begin, we are a publishing company that produces custom academic plannin

  • Cannot find backed Note in Icloud

    I accidentally erased one of my notes on my iphone 4S. The Icloud backup says that one was done at 1:30 am but when I go into Icloud the last notes was 17 days ago. What happend to the back up from 1:30 AM this morning.

  • Understand the memory consumption in Solaris

    Hi All, There is some things that I don't understand on Solaris, regarding the memory utilization. In my research on google, I have found this very usefull command : echo "::memstat" | mdb -k the output is : root@localhost > echo "::memstat" | mdb -k

  • Scheduling a background job based on fiscal variant

    Hi All The organisation which i am working for has a 4-4-5 calender. The requirement is to schedule a job( A Z program which fetches data from R/3 table) in background so that it gets executed in 4-4-5 fashion. Thanks in Advance Regards

  • BRING BACK DROP SHADOW IN TEXT

    Bring back the option to apply a drop shadow effect to text immediately!