How to summarize age ranges i.e 0-5, 6-10........?

Post Author: SunilKanta
CA Forum: General
Hi,
I am new to crystal reports, i am designing a report i.e cross tab report as shown below,
AGE TABLE
0-5
6-10
11-15
16-20
21-25
26-28
CLASS A Count
                 7
               15
CLASS B Count
                 7
               15
CLASS C Count
                109
             155
             120
               96
               89
Now my questions are,
How to display age ranges i.e 0-5, 6-10,........?
How to group ages in range and get the count or any summarized value ?
Here i am passing three parameters to the report which are
1. prmLowAge
2. prmHighAge
3. prmAgeBand
Above shown sample is characterised with prmAgeBand = 5, prmLowAge = 0 and prmHighAge = 28.
And if possible please try to find the solution for variable age bands.
Please i am very desperate. Please help me in solving this .

Post Author: Ishe
CA Forum: General
You can use a Do...While loop.  You can use the funtion below:
LOCAL STRINGVAR AGEGRP;LOCAL NUMBERVAR AGECNT := 0;
DO (AGEGRP := CSTR(AGECNT,0) + '-' + CSTR(AGECNT+5,0);AGECNT := AGECNT + 5)WHILE AGECNT < ;
AGEGRP
Also, you may want to use the following funtion to get , because the formula you were going to use would only compare the year of birth to the current year and ignore the number of months and days difference.
Int(DateDiff("d",{table.BirthDate},CurrentDate)/365)

Similar Messages

  • How to create age range according to customer's requirement

    SAP delivered standard age range(0age_range) as below:
    1  <20
    2  20 - 29
    3  30 - 39
    4  40 - 49
    5  50 - 59
    6  60 - 69
    7  >= 70
    Cusomter's requirement:
    1     <=25
    2     26 - 30
    3     31 -35
    4     36 - 40
    5     41 - 45
    6     46 - 50
    7     51 - 55
    8     >= 56
    How to handle this case if we use 0age instend of fixed age range(0age_range). should we maintain this from external flatfile, if yes, please provider the format. Thank!

    Hi,
    You can write a routine in the update rules for the range as you mentioned.
    Plz find the below code which may help u...
    DATA: AGE TYPE 0AGE.
      IF AGE <= 25.
          RESULT = '1'.
      ELSEIF AGE > 26 AND AGE <= 30.
          RESULT = '2'.
      ELSEIF AGE > 31 AND AGE <= 35.
          RESULT = '3'.
      ELSEIF AGE > 36 AND AGE <= 40.
          RESULT = '4'.
      ELSEIF AGE > 41 AND AGE <= 45.
          RESULT = '5'.
      ELSEIF AGE > 46 AND AGE <= 50.
          RESULT = '6'.
      ELSEIF AGE > 51 AND AGE <= 55.
          RESULT = '7'.
      ELSEIF AGE >= 56.
          RESULT = '8'.
      ENDIF.
    Hope this helps u...
    Regards,
    KK.

  • AGE RANGE calculation????

    hi,
    i am working with HR CUBE(0PA_C01) which is personal actions and headcount, please tell me the logic how to calculate AGE RANGE?
    thanks in advance
    sheelu

    hi,
    points will be assured.
    thaks

  • How to Calculacte Age based on DOB

    Hi Experts
      I am getting Emplloyee Date of Birth and Employment Start Date from Source System....
    My requirment is to Calculacted Age and Emp Service  in my report
    How can i achieve this....
    Is there any Function Module avaliable in BW which will calculacte No of Years between given date and Sys Date
    Please update me on how can i achieve this
    Thanks

    Hi ,
    Pls DOB load to cube & convert the DOB of employee as KF (ZDOB) using replacement path and also create variable for employee no. (ZEMP) using replacement path by replacing with attribute value and in drop select Characterstic reference (constant 1) and then create a formula (Todays System Date - ZDOB) * ZEMP.Here Todays System Date is system delivered variable.
    Also chk this links;
    Age
    Age & Caste
    age in bw
    Calculated Age and Age Ranges in a Query
    Calculated Age and Age Ranges in a Query
    Calculated Age and Age Ranges in a Query
    https://forums.sdn.sap.com/click.jspa?searchID=9537718&messageID=4976797
    Regards,
    CSM Reddy

  • Age range change preoblem

    SAP deliverd infoobject 0AGE_RANGE with standard age range, but our clients want to have special age range interval and calculate Number of Employees within this range. However HR module doesn't make this kind of range.
    1) How to change the range according to customer's expectation?
    2) How to calculated Number of Employees within this range due to HR team doesn't maintain this age range in R/3?
    3) Should we write ABAP code?
    SAP standard age range
    1  <20
    2  20 - 29
    3  30 - 39
    4  40 - 49
    5  50 - 59
    6  60 - 69
    7  >= 70
    Customer required:
    1     <=25
    2     26 - 30
    3     31 -35
    4     36 - 40
    5     41 - 45
    6     46 - 50
    7     51 - 55
    8     >= 56
    Edited by: hi ni on Apr 19, 2008 5:02 AM

    Hi,
    take a look at 0AGE doc from help.sap.com I think it should solve your problem:
    This characteristic is a derived characteristic. You can use this characteristic to display key figures in accordance with the age of an applicant or an employee.
    The characteristic contains the applicant/employee‘s age at the end of a period. You can define an age hierarchy according to the specific requirements of your enterprise, and then display the age structure of your enterprise, for example. To enable you to perform age-based calculations, the system includes an Age in Years key figure (0AGE_KYF).
    The age characteristics are calculated using update rules at the end of a period. The period depends on the InfoSource from which it is taken. For example, the end of the period can be at the end of a calendar day or month.
    SAP delivers age in years hierarchies in CSV files. (See also InfoSource Age in Years (0AGE)). You can also define hierarchies for the Age in Years characteristic (0AGE). You can determine intervals within the structure as required, for example, in five-year intervals (25 - 29 years, 30 - 34 years, and so on.) Therefore, the age structure that you define yourself offers advantages over the fixed age structure of the Age Range characteristic (0AGE_RANGE).
    http://help.sap.com/saphelp_nw70/helpdata/en/e0/afd837aeadd03ce10000009b38f889/frameset.htm
    Assign points if it was helpful...
    Regards
    Andreas

  • How to do aging for Net Debit for 0DEB_CRE_LC

    Hi to all,
    i am doing aging for receivables(0FI_AR_4) for Net debit > 0.
    I have created CKF excaption aggregation at query level to get Net debit greater than zero, via ( 0DEB_CRE_LC > 0 ) * 0DEB_CRE_LC for every customer.
    it gives correct result .
    but when i used aging via used of 0NETDUEDATE, for 1-10 and 11-30 bucket and i have restricted bucket with this CKF.
    for some customer i get correct result if both debit and credit come is 1-10 bucket and net debit of this > 0.
    But if customer debit come in 1-10 bucket and credit in 11-30 bucket it gives incorrect result.
    how to do aging for such conditions.
    Please can any one provide me solutions.
    I shall be thankfull to you for this.
    Regards
    Pavneet Rana

    Thanks for reply ,
    my query format is like that
    query rows = region and restricted with region value
    query column = aging bucket 1-10 , 11-20, and every bucket is restricted with CKF 0DEB_CRE_LC > 0 and 0NETDUEDATE and division value
    and drill down by customer and region
    format looks like that
    division1 division1 division1 division2 division2 division 2
    1 - 10 11 - 20 21-30 1 - 10 11 - 20 21 - 30
    Region1
    Region2
    so report purpose is to calculate aging for NET DEBIT VALUE .
    so if i drill down by customer for net debit value, net debit value according to bucket is correct if debit and credit of customer lies in same bucket
    and if customer credit and debit comes under different bucket net debit value is incorrect for bucket wise.
    and if dont use aging bucket net debit value according to customer and region wise is getting correct , but i need aging also for net debit value.
    please can you provide me solutions to get netdebit according to bucket wise for every customer , when drill down.
    I shall be thankfull to you for this.
    Regards
    Pavneet Rana
    Edited by: pavneet rana on Feb 7, 2011 3:02 PM

  • How to summarize Open sales order credit value

    Hi, friends.
    I am designing Add-on report about credit exposure.
    I found the relevant tables of Credit Limit in FD32
    KNKK
    S066
    S067
    Then, I would like to show the document details of open sales order credit value in the report.
    I tried to summarize the open sales order amount from VBAK, VAUK, VBAP, VBUP.
    However, it doest match to the amount in S066 table.
    Can anyone tell us how to summarize Open sales order credit value from SD documents?
    Regards,
    Yu

    Sudheer,
    You need to check the update rule given in the definition of the Credit control Area which you are using for credit management. If you want only the open deliveries then you need to have update rule 15 in the credit control area.
    In the credit controal settings, you need to have settings for the credit check at the delivery level.
    Hope this will solve your issue.
    Regards,
    Chetan
    Edited by: Chetan Gupte on Jul 15, 2010 8:56 PM

  • How to make column range based on a column in Oracle BI 11g

    Hello everyone!
    I want to know, how to make column range from a column in oracle bi 11g.
    for example!
    I have a column amounts and I want to build on this with other values of quantity, other column range 1-9,10-49,50-99,100-249, 249 o more.
    regards!
    when I try to make the range I have error.
    Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: SELECT CASE WHEN "CUBO_DEEE_TAB"."CANTIDAD" BETWEEN 1 AND 9 THEN 1 a 9 ELSE "CUBO_DEEE_TAB"."CANTIDAD" END FROM "DM_DEEE"
    Edited by: 964157 on 09-oct-2012 11:50

    You cannot add columns dynamically. But you can define a maximum number of numbers and then hide unused columns in your form useing SET_ITEM_PROPERTY(..,VISIBLE, PROPERTY_FALSE);

  • How to change the range in numbers?

    how to change the range on graph from .0000 to .0 or .00 and ther range on thr graph from 2's to .5

    Hi,
    Click on Graph Properties icon->Scale Tab -> Click on Vertical axis and specify your range.
    Regards,
    Dpka

  • How to enter a range of ports in the firewall

    Does anyone know the syntax of how to enter a range of ports in the firewall so I don't have to enter each individual number? 
    For instance, to open port 15000 to 15264, is it possible to type something like "15000 - 15264" instead each port followed by a comma?
    Thanks.

    Hi,
    In Tiger it is the same as the comma and dashes thing I listed for some routers.
    You can also click the Edit button in that pic I posted and look at which ports are listed (they will be greyed out on the Preset ones)
    Windows Sharing should list the SMB ports and the Printing ports.
    EDIT:
    Actually on this page where I listed how to set up iChat - SMB is a separate line.
    (Printing sharing may also list the Windows Print Sharing port)
    If those don't cover the Windows app you want to communicate with you will have to make your own Entry Like the Edit link I just inserted)
    10:37 PM      Friday; May 27, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Hi i would like to know how to extend the range of my time capsule wifi network(500G 802.11n) using an airport express. i have a double storey home and would like to extend range to my upstairs bedrooms.i have a time capsules network setup via a netgear a

    hi i would like to know how to extend the range of my time capsule wifi network(500G 802.11n) using an airport express. i have a double storey home and would like to extend range to my upstairs bedrooms.i have a time capsules network setup via a netgear adsl.i have a second imac upstairs which connects to time capsule wifi network (it is within range as it is directly abobe on 1st floor)
    could you tell me how best to set airport express up to extend my wifi range?

    Greetings,
    This is called an "Extended wireless network".
    Read this article for details and steps on how to extend your TimeCapsule's network:
    http://support.apple.com/kb/HT4259
    Cheers.

  • How to design ageing report

    hi friends
    How to create ageing reports.If any one has documents/links pls provide me..

    Hi,
    Check in..
    http://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    Thanks
    Reddy

  • ABAP-HR MODULE(HOW TO CALCULATE AGE & YEARS OF SERVICE)

    HI,
    HOW TO CALCULATE AGE & YEARS OF SERVICE means for example
    I AM USING PNPCE LDB.
    (1) whose age is greater than 52.833 years with 7.833 years of service, with annual rate of pay $170,000 or more, or
    (2) age plus employment service is 65 or more, with annual rate of pay of $ 170,000 or more.
    Note that the $ 170,000 parameter would be a variable that could change annually when this report would be generated. In the past, age and service value were determined as of the run date. The determination date would also be a variable that would change when the report would be generated.
    Thanks&Regards
    Rahul.

    Hi Rahul,
    This is the 2nd warning !!! Please... use the correct or most appropriate forum.
    The ABAP Objects Forum should be used for: ABAP Object definition and implementation including encapsulation, interfaces and inheritance in ABAP Objects.
    This thread will be moved from to .
    You're asking this question in two thread, so the duplicated thread will be deleted.
    Please have a look at [Forum Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] before posting.
    Also read this thread Welcome and Rules of Engagement.
    Greetings,
    Marcelo Ramos

  • Calculated Age and Age Ranges in a Query

    Hello,
    We are using 3.5 Query Designer.
    I am trying to create age ranges in a query. The InfoProvider at this point (I've gone very simple) is InfoObject, 0PERSON.
    I've created a calculated key figure (CKF) called age which I have used a formula to define. The age is calculating correctly. Age has  'Calculate Result As...' = Summation. And in the 'Enhance', 'Time of Calculation' is set to Before aggregation. Number of decimal places set to 0. Now I've created a CKF, AGE_GE_40 which has as its formula 'COUNT(('Age' >= 40)). I've created an additional CKF, AGE_LE_39 which has a formula 'COUNT(('Age'<=39))'. Both of these have the 'Summation' set in the calculation section. The query contains 0GENDER, 0PERSON with AGE_GE_40 and AGE_LE_39 and Number of records as the key figures in the columns. When executed initially, all of the result rows are correct. The problem is when I remove 0PERSON, the result rows only give me 1 per gender. This seems like an easy thing to do, why is it not working?
    Thanks for any help,
    Diane Merrill

    Diane,
    For each row in the query data, there is only one age value calculated, which is the aggregration of all records which fulfills the row's characteristic value combination. Thus, when there is Gender & Person columns in the query, each row calculates an age value for the Gender/Person combination, which is essentially the same as for each person, because each person has one gender value. However, when you remove person from the columns, there will be only two values for gender, and the age is calculated as the sum of ages for all records with the same gender value. To reveal more on this, you can add the Age key figure into the query columns, and run the query with only the gender (i.e. without person). Once you see the age value for each row, it should be clear to you.
    Please reward points if this is helpful.
    Wayne

  • How to Calculate AGE by getting difference between two Date Fields

    HI Gems
    I need to calculate AGE from getting difference from two date fields. But when i am trying to wrte fromula as Current date - date1(some date field) then it is showing error.
    How can i get values.
    Thanks
    Manu

    You already asked this question:
    How to calculate AGE from two different date fields

Maybe you are looking for

  • How do I run HD Media from an External Hard Drive?

    I have a Macbook Pro, with Final Cut 7. I'm editing clips in HD shot with Canon 7d. I have a 250GB external Hard Drive. How do I set it up as my "Scratch Disk" and able to run all the media I'm editing from there too (for Playback, ect). And in the e

  • Conversion rate issue in real estate.

    Hi, The currency of the company code under which the contract is created is GBP where as the vendor with whom the rent agreement is entered into is related to EUR currency. In this case, the local currency is GBP. We observed that the u201CThe Rent P

  • PDF to Indesign Converter

    Hello:  I need to convert a PDF document to Indesign.  How do I do that?  I've tried looking it up online but have been unsuccessful. Please advise. Thank you. Sara

  • Metafile download failed - Flash 11.6.602.180

    I have x2 systems that I am trying to install this onto since yesterday morning both with IE9: Windows 7 Enterprise x86 SP1 Windows 7 64-bit I select that I do not want Chrome or automatic updates and it just will not install. I noticed that if I sel

  • ISL between switches

    hi, I have a novice isl question. I have 2 new 9506 switches, they are seperate fabrics. we have some older switches that I would like to ISL to them. By looking at the older switches I see the way they are ISLed and want to understand if this is cor