Count the days Crystal!!

Afternoon all,
I have found a strange thing here, I am using datediff to find out the number of days a job has taken to be shipped.
I found out that Crystal report does not include the date (day of order) and counts from the next following day.
Example
Order placed = 25/06/2008
Order Shipped = 27/06/2008
Days took = 2 (According to Crystal)
However,
According to our old system the same job took 3 days
Order placed = 25/06/2008
Order Shipped = 27/06/2008
Days took = 3 (According to our old system)
How can I make the Crystal count the order day as well!??
many thanks
Kind Regards
Jehanzeb

Thanks guys!!
I do not regert joining this forum! There are sooo many hands to help!
Yes! even though the order is placed at 6pm it takes it as 1 day (the old system because our ordering system runs 24 hours (online).)
Oki now come to a stupid question.
How can I add 1 day into my formula?
I have a formula:
//weekday({order_progress.date_created},crMonday)- day({bank_hol.holiday_date});
//weekday({order_header.date_entered},crMonday)- day({bank_hol.holiday_date});
if {order_progress.order_status}= 77 then
if datediff('d',{order_header.date_entered},{order_header.act_despatch}) < 9 then
1
else
2;
if datediff('d',{order_header.date_entered},{order_header.act_despatch}) <= 8 then
totext(datediff('d',{order_header.date_entered},{order_header.act_despatch}),0,'')
else
"9+";
In the above coding, Date Entered is the date when order is placed and Despatched date is the date when the order is shipped. How can I add 1 day to into this formula?
Many thanks
Regards
Jehanzeb
Edited by: Jehanzeb Navid on Jul 22, 2008 3:11 PM
Edit: I tried this method but didn't work
if datediff('d',{order_header.date_entered}+1,{order_header.act_despatch}+1) < 9 then
1
else
2;
if datediff('d',{order_header.date_entered}+1,{order_header.act_despatch}+1) <= 8 then
totext(datediff('d',{order_header.date_entered}+1,{order_header.act_despatch}+1),0,'')
else
"9+";

Similar Messages

  • How to count the days between Date Range using OO ABAP?

    hi experts,
            i want to count the days between Date Range using OO ABAP for that  which class and method  can i use?.
    Thanks,
    Mahesh.

    Not sure I understand the requirement for it to be OO, but you could always write your own (i.e. use this):
    REPORT zz_date_diff.
    CLASS date_diff DEFINITION.
      PUBLIC SECTION.
        METHODS diff IMPORTING     i_date_fm TYPE d
                                   i_date_to TYPE d
                     EXPORTING     e_days    TYPE i.
    ENDCLASS."
    CLASS date_diff IMPLEMENTATION.
      METHOD diff.
        e_days = i_date_to - i_date_fm.
      ENDMETHOD."
    ENDCLASS."
    DATA: g_ref TYPE REF TO date_diff,
          g_days  TYPE i,
          g_date_fm  TYPE d VALUE '20080101',
          g_date_to  TYPE d VALUE '20090101'.
    START-OF-SELECTION.
      CREATE OBJECT g_ref.
      CALL METHOD g_ref->diff
        EXPORTING
          i_date_fm = g_date_fm
          i_date_to = g_date_to
        IMPORTING
          e_days    = g_days.
      WRITE g_days.

  • Be careful of "Prompt user to change password before expiration" policy -- it's counting the days wrong!!

    After several tests, I'm pretty sure that the policy "Interactive logon: Prompt user to change password before expiration" is counting the wrong days. (Note: this policy is in Windows Settings > Security Settings > Local Policies > Security
    Options)  So I think I should post this in the forum in the hope that it could be helpful to others in the same case as me, esp if the policy is pushed out as a domain-wide policy.
    First, the context of the test, ie domain-wide policy settings:
    1. Password minimum age = 2 days
    2. Password maximum age = 4 days
    3. Prompt user to change password before expiration = 2 days
    If everything is going fine, users will be asked to change password when it is changeable (ie it has reached the minimum age).  However, it turns out that users are prompted BEFORE they can change password.  Look at the image below that I got in
    Win7:
    (In WinXP, we have similar prompt when user has just logged in)
    Look at the clock: it's 13:16 (04/12/2013).  Then look at the DOS window in which I ran the "net user /domain" command and read the line "Password expires": it's shown
    06/12/2013 18:09:04.
    A little math would tell me that if users are prompted to change password *2 days* before expiration, the dialog will appear
    ONLY AFTER 04/12/2013 18:09:04.  But since the prompt is shown at 13:16 (ie well before 18:09), that mean the "prompt user...." policy makes mistakes in calculating the moment to show the prompt.
    In other words, if we have the policy set like this:
         Prompt user to change password before expiration =
    N days
    The prompt will actually appear from N+1 days before expiration.
    I would consider this as a bug, but I also suppose it's hard to make Microsoft fix it.  So that's why I make this post to warn others.  In my case, I have received several calls from users complaining that they were prompted to change password
    but their new passwords were always refused and they had no idea what went wrong.  And it took me a lot of effort to sort out what really went wrong.  And in order to work around this stupid bug, I have to change the "Prompt user...." policy
    to N-1 days (before expiration) instead of N days previously.
    Hope this help

    Hi,
    Based on my research, you are right that the prompt policy is implemented by date, which is by design.
    “Set
    Interactive logon: Prompt user to change password before expiration to 5 days. When their password expiration
    date is 5 or fewer days away, users will see a dialog box each time they log on to the domain”, I quoted this sentence from the article below:
    Interactive logon: Prompt user to change password before expiration
    http://technet.microsoft.com/en-us/library/jj852243.aspx
    The problem is consistency!  For Minimum/Maximum password age properties, they are also defined for
    days as well.  But for them, days are exact days, ie a
    multiple of exactly 24 hours.  There is an "Explain" tab for every parameter, but even if you read them through, you can't tell if day means strict multiple of 24 hours or loose definition of days.  I'll leave the exercise to you to read
    them if you like and spare me the article from your KB library.
    As for the password minimum age part, what I mean is that is why users can’t not change their password within 2 days when the prompt appears before the changeable time.
    Anyway, I agree with you that we need to be careful when we configure the password policy because the Prompt policy is not doing calculation by hours.
    Miss, the 2 days is just a TEST EXAMPLE.  Let's say it's
    N days if you was unable to understand.  I wouldn't change N days to N-1 days because of this stupid GUI bug.  As I said earlier and let me repeat it once more,
    Minimum password age = N days is a security policy and it is more important than the user prompt and no security officer with sane mind will change this.

  • Given various date ranges, count the occurrences of dates in PL/SQL

    i have a table of employees that have a start date and end date on a project. Some employees end date is null because they are still working on the project. So I want to find for each day in JAN, how many people on working on the project.
    So I generate the dates JAN 1 - 31 with this:
    Declare
      days DATE := To_Date('01-JAN-11','dd-mon-yy');
    BEGIN
      FOR days IN 1..31
      LOOP
        Dbms_Output.Put_Line(TO_CHAR(days ,'dd-Mon-yy'));
        days  := days  + 1;
      END LOOP;
    END; For employee X (ID 123), his start date is 1st and end date is 4th. So I use this query to list the dates he worked on (Jan1 jan2 jan3 jan4):
    DECLARE
    da Number;
    days Date;     
    sta emp.start%Type;
    BEGIN
    Select end-start+1
    Into da
    From emp
    where emp_id = 123;
    Select start
    Into sta
    From emp
    Where emp_id = 123;
      days  := To_Date(sta,'dd-mon-yy');
    FOR i IN 1..da
      LOOP
        Dbms_Output.Put_Line(TO_CHAR(days ,'dd-Mon-yy'));
        days  := days  + 1;
      END LOOP;
    END;Now the problem I am having is trying to do a for loop to check the work days from each employee in the table. I guess I need to iterate over the employee IDs. The above code, I entered the empoyee ID myself to find his work days, but I am trying to loop over all the employees to find and count the days. Any help on this part?
    Ultimately I am trying to get this:
    Day Count
    Jan 1 5
    Jan 2 3
    Jan 3 1
    Jan 31 5

    select  project_id,
            dt,
            nvl(count(emp_id),0)
      from  employee_projects,
            (select date '2010-12-31' + level dt from dual connect by date '2010-12-31' + level <= date '2011-01-31')
      where dt between start_date(+) and nvl(end_date(+),sysdate)
      group by project_id,
               dt
    /SY.
    Edited by: Solomon Yakobson on Jan 18, 2011 5:01 PM

  • Need to count the number of groups in a Crystal Reports 2008 report

    I have created a report with three levels of grouping. There are several items in each level.  I want to count the number of groups.  I have tried countdistinct but it counts the number of items in the lowest level of grouping and I want the number of items in the higher  levels.  This is a distribution data base.  I have the data grouped by date, by truck on each date, and by "run" or load on each truck on each date.  I want to count the total number of groups of truck and run, which is the second level of the grouping.  Any ideas? I am fairly new to Crystal.

    Hi Debbie,
         To count the number of groups please try the folling steps:
    1) Create a formula @reset and place this formula in the page header
        whileprintingrecords;
        numbervar i:=0;
    2) Create another formula @evalgroup place this in the group header where you want to count the values.
        whileprintingrecords;
        numbervar i:= i+1;
    3) Create another formula @display and place this in report footer.
        whileprintingrecords;
        numbervar i;
    In order to display the count of details which are printing in the detail section place the eval formula in the detail section and the @display formula in the group footer.
    Hope this helps!!!
    Regards,
    Vinay

  • Count the varieties of transactions in a day for 15mins interval

    Hi All,
    I have transaction data for the whole day for multiple transactions like saleID1, saleID2 etc. I need to club them separately in 15 minutes interval and put as a file format. e.g,
    col1 col2 col3
    1 count of transaction A between 2.00-2.15 count of transaction B between 2.00-2.15
    2 count of transaction A between 2.15-2.30 count of transaction B between 2.15-2.30
    3 count of transaction A between 2.30-2.45 count of transaction B between 2.30-2.45
    4 count of transaction A between 2.45-3.00 count of transaction B between 2.45-3.00
    1 count of transaction A between 3.00-3.30 count of transaction B between 3.00-3.15
    2 count of transaction A between 3.15-3.30 count of transaction B between 3.15-3.30
    3 count of transaction A between 3.30-3.45 count of transaction B between 3.30-3.45
    And so on..
    I am using count (cloumn1) from table X . I belive it won't be optimal to add a time of 15 mins timing everytime.
    Please do revert if I can reach my target optimally.
    Cheers,

    Assuming you have a structure similar to this:
    SQL> SELECT * FROM t ORDER BY trans_date, item_cd;
    TRANS_DATE           I   ITEM_QTY
    05-jun-2005 21:50:38 A          9
    05-jun-2005 21:50:38 B          8
    06-jun-2005 02:45:51 A          6
    06-jun-2005 02:45:51 B          6
    06-jun-2005 03:34:23 A          9
    06-jun-2005 03:34:23 B          9
    07-jun-2005 10:36:17 A          6
    07-jun-2005 10:36:17 B          9
    08-jun-2005 03:24:50 A          7
    08-jun-2005 03:24:50 B          6
    08-jun-2005 17:43:15 A          6
    08-jun-2005 17:43:15 B          6
    09-jun-2005 06:20:35 A          9
    09-jun-2005 06:20:35 B          7
    09-jun-2005 08:44:44 A          8
    09-jun-2005 08:44:44 B          9
    11-jun-2005 04:58:01 A          9
    11-jun-2005 04:58:01 B          7
    11-jun-2005 08:47:48 A          9
    11-jun-2005 08:47:48 B          7Then to get counts by day by 15 minute interval, you could use something like:
    SQL> SELECT 'Between '||TO_CHAR(trans_15, 'dd-mon hh24:mi')||
      2         ' and '||TO_CHAR(trans_15 + (900/24/60/60), 'dd-mon hh24:mi')||
      3         ' Item A: '||itema||' Item B: '||itemb outp
      4  FROM (SELECT trunc(trans_date) +
      5                  (TO_NUMBER(TO_CHAR(trans_date,'sssss')) -
      6                   MOD(TO_NUMBER(TO_CHAR(trans_date,'sssss')), 900))/24/60/60 trans_15,
      7               SUM(DECODE(item_cd, 'A', 1, 0)) itema,
      8               SUM(DECODE(item_cd, 'B', 1, 0)) itemb
      9        FROM t
    10        GROUP BY trunc(trans_date) + (TO_NUMBER(TO_CHAR(trans_date,'sssss')) -
    11                 MOD(TO_NUMBER(TO_CHAR(trans_date,'sssss')), 900))/24/60/60)
    12  ORDER BY trans_15;
    OUTP
    Between 05-jun 21:45 and 05-jun 22:00 Item A: 1 Item B: 1
    Between 06-jun 02:45 and 06-jun 03:00 Item A: 1 Item B: 1
    Between 06-jun 03:30 and 06-jun 03:45 Item A: 1 Item B: 1
    Between 07-jun 10:30 and 07-jun 10:45 Item A: 1 Item B: 1
    Between 08-jun 03:15 and 08-jun 03:30 Item A: 1 Item B: 1
    Between 08-jun 17:30 and 08-jun 17:45 Item A: 1 Item B: 1
    Between 09-jun 06:15 and 09-jun 06:30 Item A: 1 Item B: 1
    Between 09-jun 08:30 and 09-jun 08:45 Item A: 1 Item B: 1
    Between 11-jun 04:45 and 11-jun 05:00 Item A: 1 Item B: 1
    Between 11-jun 08:45 and 11-jun 09:00 Item A: 1 Item B: 1If you do not care about the day, only the interval, then you could do:
    SQL> SELECT 'Between '||TO_CHAR(trans_15, 'hh24:mi')||
      2         ' and '||TO_CHAR(trans_15 + (900/24/60/60), 'hh24:mi')||
      3         ' Item A: '||itema||' Item B: '||itemb outp
      4  FROM (SELECT TO_DATE(TO_NUMBER(TO_CHAR(trans_date,'sssss')) -
      5                   MOD(TO_NUMBER(TO_CHAR(trans_date,'sssss')), 900),
      6                       'sssss') trans_15,
      7               SUM(DECODE(item_cd, 'A', 1, 0)) itema,
      8               SUM(DECODE(item_cd, 'B', 1, 0)) itemb
      9        FROM t
    10        GROUP BY TO_DATE(TO_NUMBER(TO_CHAR(trans_date,'sssss')) -
    11                   MOD(TO_NUMBER(TO_CHAR(trans_date,'sssss')), 900),'sssss'))
    12  ORDER BY trans_15;
    OUTP
    Between 02:45 and 03:00 Item A: 1 Item B: 1
    Between 03:15 and 03:30 Item A: 1 Item B: 1
    Between 03:30 and 03:45 Item A: 1 Item B: 1
    Between 04:45 and 05:00 Item A: 1 Item B: 1
    Between 06:15 and 06:30 Item A: 1 Item B: 1
    Between 08:30 and 08:45 Item A: 1 Item B: 1
    Between 08:45 and 09:00 Item A: 1 Item B: 1
    Between 10:30 and 10:45 Item A: 1 Item B: 1
    Between 17:30 and 17:45 Item A: 1 Item B: 1
    Between 21:45 and 22:00 Item A: 1 Item B: 1HTH
    John

  • Count the number of days in the selected range using Customer exit

    Hi Experts,
    we have requirment where user is asking to add a column to report, which will have 'count of days for which key figure is having values' for each of the months and the Header would be 'Day Count'
    Please let me know if its possible using Customer exit?

    Hi,
    In our report we have two characteristics site no. and product and we have 6 key figures of type quantity and Input for the report is Fiscal year/period
    So in the report Key figures are populated with values for respective site no. and product combination
    Now the user wants new column in report which will have header u2018Day countu2019 and it should Simply count the number of days in the selected range that have a volume different than 0 for key figure
    Please let me know if more details are required

  • SQL to count the number of days between two dates

    Does any one have or know how to count the number of days/weeks between 2 dates.
    I have thought about using MONTHS_BETWEEN, but do not know how to make it accurate down to one day?
    Any suggestions would be appreciated.

    here are the different queries I came up with to do this, you may want to check it for perticular cases involving Sun and Sat as start and end dates.
    select to_number(to_char(to_date('21-JUL-00','dd-mon-yy'), 'ww'))
    - to_number(to_char(to_date('10-JUL-00','dd-mon-yy'), 'ww')) from dual;
    select (Next_Day(to_date('21-JUL-00','dd-mon-yy')-1, 'Sunday')
    - Next_Day(to_date('10-JUL-00','dd-mon-yy')-1, 'Sunday'))/7 from dual;
    select (Next_Day(to_date('21-JUL-00','dd-mon-yy')-6, 'Sunday')
    - Next_Day(to_date('10-JUL-00','dd-mon-yy')-6, 'Sunday'))/7 from dual;
    null

  • Macbook (mid 2012, 9,2) has very poor performance since the day I bought it (less than 2 months ago)

    Problem description:
    My macbook is extremely slow since the day I bought it (which was less than 2 months ago)…Came preinstalled with Mavericks and 4GB of RAM. Upgraded it to 16GB hoping that would help, but that did very little…then upgraded to Yosemite. That just made it worse. Formatted the whole thing and installed clean Yosemite. Still, every time I right click, I get the rainbow loading icon and it hangs. Every time I open any file, or click any app, it hangs for a few seconds, again with a loading icon. Every time I play a song on iTunes or even VLC for that matter, it stops multiple times, every few seconds. Feels like it’s “buffering” while I’m playing a song off my hard drive. It’s been bothering me for too long now…Any idea what the issue is exactly?
    EtreCheck version: 2.0.11 (98)
    Report generated 12 November 2014 23:55:47 GMT-3
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Mid 2012) (Verified)
      MacBook Pro - model: MacBookPro9,2
      1 2.5 GHz Intel Core i5 CPU: 2-core
      16 GB RAM Upgradeable
      BANK 0/DIMM0
      8 GB DDR3 1600 MHz ok
      BANK 1/DIMM0
      8 GB DDR3 1600 MHz ok
      Bluetooth: Good - Handoff/Airdrop2 supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      Intel HD Graphics 4000 -
      Color LCD 1920 x 1080
      LCD TV spdisplays_1080p
    System Software: ℹ️
      OS X 10.10 (14A389) - Uptime: 2 days 10:0:44
    Disk Information: ℹ️
      APPLE HDD TOSHIBA MK5065GSXF disk0 : (500.11 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted> : 210 MB
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      Macintosh HD (disk1) /  [Startup]: 498.88 GB (374.54 GB free)
      Core Storage: disk0s2 499.25 GB Online
      MATSHITADVD-R   UJ-8A8 
    USB Information: ℹ️
      SIGMACHIP USB Keyboard
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Inc. BRCM20702 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Computer, Inc. IR Receiver
    Thunderbolt Information: ℹ️
      Apple Inc. thunderbolt_bus
    Configuration files: ℹ️
      /etc/hosts - Count: 6
    Gatekeeper: ℹ️
      Anywhere
    Kernel Extensions: ℹ️
      /Library/Application Support/VirtualBox
      [loaded] org.virtualbox.kext.VBoxDrv (4.3.18) Support
      [loaded] org.virtualbox.kext.VBoxNetAdp (4.3.18) Support
      [loaded] org.virtualbox.kext.VBoxNetFlt (4.3.18) Support
      [loaded] org.virtualbox.kext.VBoxUSB (4.3.18) Support
    Startup Items: ℹ️
      TuxeraNTFSUnmountHelper: Path: /Library/StartupItems/TuxeraNTFSUnmountHelper
      Startup items are obsolete and will not work in future versions of OS X
    Launch Agents: ℹ️
      [not loaded] com.adobe.AAM.Updater-1.0.plist Support
      [running] com.teamviewer.teamviewer.plist Support
      [running] com.teamviewer.teamviewer_desktop.plist Support
    Launch Daemons: ℹ️
      [loaded] com.macpaw.CleanMyMac2.Agent.plist Support
      [loaded] com.microsoft.office.licensing.helper.plist Support
      [loaded] com.teamviewer.Helper.plist Support
      [running] com.teamviewer.teamviewer_service.plist Support
      [not loaded] org.virtualbox.startup.plist Support
    User Launch Agents: ℹ️
      [loaded] com.adobe.ARM.[...].plist Support
      [loaded] com.google.keystone.agent.plist Support
      [loaded] com.macpaw.CleanMyMac2Helper.diskSpaceWatcher.plist Support
      [loaded] com.macpaw.CleanMyMac2Helper.scheduledScan.plist Support
      [loaded] com.macpaw.CleanMyMac2Helper.trashWatcher.plist Support
      [not loaded] org.virtualbox.vboxwebsrv.plist Support
    User Login Items: ℹ️
      iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
      Dropbox Application (/Applications/Dropbox.app)
    Internet Plug-ins: ℹ️
      AdobePDFViewerNPAPI: Version: 11.0.0 - SDK 10.6 Support
      SharePointBrowserPlugin: Version: 14.4.5 - SDK 10.6 Support
      AdobePDFViewer: Version: 11.0.0 - SDK 10.6 Support
      QuickTime Plugin: Version: 7.7.3
      AdobeAAMDetect: Version: AdobeAAMDetect 1.0.0.0 - SDK 10.6 Support
      Default Browser: Version: 600 - SDK 10.10
    3rd Party Preference Panes: ℹ️
      Tuxera NTFS  Support
    Time Machine: ℹ️
      Time Machine not configured!
    Top Processes by CPU: ℹ️
          20% mds
          6% Google Chrome
          4% WindowServer
          1% hidd
          0% Dropbox
    Top Processes by Memory: ℹ️
      481 MB Coda 2
      258 MB Google Chrome
      189 MB softwareupdated
      189 MB loginwindow
      189 MB Finder
    Virtual Memory Information: ℹ️
      5.71 GB Free RAM
      7.22 GB Active RAM
      2.63 GB Inactive RAM
      1.62 GB Wired RAM
      25.24 GB Page-ins
      0 B Page-outs

    If it has been slow since it came out of the box, it's probably defective. The warranty entitles you to complimentary phone support for the first 90 days of ownership.

  • I want to accumulate rain for the day, month and year; What formula can I use?

    I want to accumulate rain for the day, month and year; What formula or expression can I use.
    I am using a Rain Wise product that converts pulses to an analog value.  The Rain Wise device can be
    set to measure up to 1", 5", or 10".  I will be setting the unit to 10 inches in increments of 0.01 inches.
    What I would like to do is everytime the signal increments I would like to count it as 0.01 then after reaching
    a period of time whether it be a day or a month reset back to zero.
    Need some advise on this problem.
    Solved!
    Go to Solution.

    Hello Ryan,
    Lookout gets a Modbus over Ethernet signal which originates as a 4-20mA input to a Moxa Ethernet I/O Module (E1240) in the field.  In Lookout I created a ModbusEthernet Driver and a tag which scales 0 - 65534 RAW to 0-10 Eng.  [0 - 10 is inches of rain]  Also, another piece of information is that after the rain gauge maxes out at 10 inches it will zero out and start over.
    I though the accumulator was time based and took a sample over a specific time period, for instance, one sample every 30 seconds then accumulate.  If this is so then if I have 5 inches of rain and then it stopped raining, then 30 seconds latter it would sample, it would see 5 inches and add that to be 10 inches when actually it had only rained 5 inches. 
    I really need some help with this process,
    David Lopez
    City of Corpus Christi

  • Send an Email If there is no Processed message for the Day

    Hi all,
    I have to send an Email if there is no file processed in XI for that particular interface on that day.
    Is it possible and How?
    Regards

    Hi,
    Idea is ideally too good logically.
    >>Yes its possible.Create the UDF in the mapping and define one global counter variable (default value is 0).
    Can you please start me on this how to.....
    >>finally at the end of the day check the counter value if it is equal to 0 (zero) then call the alert.
    How to check the counter value here and there by how to trigger the email
    >>Once the day is changed then set the counter value 0.
    Where shld i do this and how???
    Please clarify me or just start me on this how to go....
    Regards

  • How do I count the unique value pairs in two columns of a table?

    I have a table (Table 2) that is populated with data from an imported .csv file. On table 1 I need to count the unique value pairs in two columns of Table 2.
    Here's what I have:
    Date                                        Person
    7/10/2011                         A
    7/12/2011                         W
    7/12/2011                         X
    7/12/2011                         X
    7/12/2011                         X
    7/12/2011                         Z
    7/14/2011                         Z
    7/15/2011                 X
    7/16/2011                         Z
    I'm focusing on person "X" and can easily count how many days that person shows up but what I want is to see on how many unique days that person shows up.
    Here's the result I'm looking for (Person "X" shows up on 2 different days - 3 times on 7/12/2011 and once on 7/15/2011):
    X                    2
    I can't seem to find a function that allows me to do that. I also am not allowed to modify Table 2 so that leaves me to come up with a solution on Table 1.
    Any ideas would be greatly appreciated.

    Hi John,
    Not being allowed to modify Table 2 is a minor inconvenience. Just copy (using a formula) the necessary two columns onto Table 1.
    Yellow columns may be hidden. The procedure progresses from left to right. All formulas are entered into row 2 then filled down that column to the end of the table. The table must be as long as the list in column A of Table 2.
    A2: =Table 2::A
    Fill right to column B.
    Fill both columns down as far as needed.
    I've used actual Date and Time values in column A, formatted to show only the Date part, but the technique will work with text in these cells, provided all cells representing the same 'date' have exactly the same content.
    C2: =A&B
    This concatenates the contents of each row of columns A and B into a single text string.
    D2: =COUNTIF($C$2:C2,C)
    This counts the number of occurrences of the Date&Name string on the current row from the first regular cell in column C (C2) to the current cell.
    E2: =IF(COUNTIF($B$2:B2,B)=1,MAX($E$1:E1)+1,"")
    This constructs the index of first occurrences of each name, in the order they first occur. The index is used by LOOKUP in column F.
    F2: =IF(ROW()-1>MAX(E),"",LOOKUP(ROW()-1,$E,$B))
    This uses the index value created in E as a search-for value to extract a single copy of the names in column B. The result is a list of all distinct names in the list. Note that spelling differences will be counted as distinct names.The IF statement stops the listing when the last distinct name is extracted.
    G2: =IF(LEN(F)>0,COUNTIFS($B,"="&F,$D,"=1"),"")
    This counts the number of 'first occurrences of distinct Date & Name strings for each name on the list (ie. the number of distinct dates on which each name appears in the original list).
    All of the functions used are described, with at least one example for each, in the iWork formulas and Functions User Guide. You can download the guide, and the Numbers '09 User Guide, via the Help menu in numbers.
    Regards,
    Barry

  • How do I count the number of times a word appears in a column?

    What I have is a spreadsheet logging work history. Let's say the work location is "office", "home", or "travel" and I want to have a separate cell in another table for totals, count up the number of time each appears in the data for the year. So it would look like this:
    Date
    Location
    sept 1
    office
    sept 2
    home
    sept 3
    home
    sept 4
    travel
    sept 5
    office
    sept 6
    office
    sept 7
    office
    sept 8
    travel
    sept 9
    home
    sept 10
    office
    Totals
    Days
    10
    Office
    5
    Home
    3
    Travel
    2
    I just can't figure out how to develop the formula to put in the Totals column to make it work this way. If you can help me achieve this I'd really appreciate it!

    Hi SpartanAntarctican,
    Table 1 to record your locations
    Date
    Location
    sept 1
    office
    sept 2
    home
    sept 3
    home
    sept 4
    travel
    sept 5
    office
    sept 6
    office
    sept 7
    office
    sept 8
    travel
    sept 9
    home
    sept 10
    office
    Table 2 to sum your locations
    Totals
    Days
    10
    Office
    5
    Home
    3
    Travel
    2
    In Table 2 the formula in B2
    =ROWS(Table 1::A)−1
    Minus 1 because there is a Header Row in Table 1.
    In Table 2 the formula in B3 (and Fill Down)
    =COUNTIF(Table 1::B,A3)
    You can check this by adding 5 + 3 + 2 to arrive at 10
    Or maybe delete Row 2 put the Days calculation into a Footer Row in Table 2
    =SUM(B) .
    Regards,
    Ian.

  • Count the number of business partners on a non-cumulative key figure

    Dear experts,
    I have a problem. We have an InfoCube in BW in which the Activity Journals are loaded every day. In this Activity Journals it is registered that a Material was listed (available) at a customer (value 0 or 1).
    We have a non-cumulative key figure MXW_LISTN with inflow (MXW_LISTI) and outflow (MXW_LISTO). In time this key figure receives +1 or -1 for a customer, material combination.
    I want to use MXW_LISTN in the query in a specific way. The key figure on itselve tells me how many listings there are. However, I want to know how many business partners there are with a listing.
    I was thinking about an exception aggregation on MXW_LISTN with reference characteristic 0BPARTNER and "Count <> 0". BW however refuses to do so and only lets me do simple aggregations such as AVG, MIN, MAX etc.
    Can you think with me and come with an proper solution to count the number of business partners with a listing?
    Your help is very much appreciated and rewarded!
    Best regards, Hans de Klein

    Would anything with virtual key figures be a solution? Please help me out!
    Best regards, Hans de Klein

  • Applescript - how can I count the number of records in a Word data source?

    I have written a script in AppleScript to open Word and then perform a mail merge from a data source and everything is working fine.
    One thing I want to do but am struggling with is to return the number of records in the mail merge.
    I am trying things like:
    get last record of datasource of mydatasource
    and also haven't been able to find anything in the AppleScript 2004 Word Reference Guide.
    Can anyone help as I have been searching the web and trying things all day and I am sure it can't be difficult.
    Thank you.

    I don't think there is an automatic way to get a line count, but I don't have any problem just counting the lines on a page. Maybe some more information about what you are trying to do and why you can't do it would help someone to come up with a helpful suggestion.

Maybe you are looking for

  • Dynamic Interface in Query String does not work?

    Hi All, i have exposed a interface as a webservice with the help of the Define Web Service in Configuration Builder. In the SOAP Sender Communication Channel i have checked the options Use Encoded Headers and Use Query String The url of the webservic

  • Pricing error: Mandatory condition ZPRI is missing

    Hi, When creating a credit memo request with reference to the original order we get the error: Pricing error: Mandatory condition ZPRI is missing. Checking in Analysis we get following information: "The condition is set as an automatic condition with

  • Bug/No full support for GLUT on macbook pro retina

    Hi, We have a software that makes use of GLUT, the openGL utility library. This is multiplatform so it conveniently let's our software compile to many platforms. We are now thinking of compiling it for macs but there seems to be some bug in the OSX i

  • MacBook pro Late 2011 detect external monitor but still not signal on it

    Good day. I have MBP 13" Late 2011 Processor  2.4 GHz Intel Core i5 Memory  4 GB 1333 MHz DDR3 Graphics  Intel HD Graphics 3000 384 MB Software  Mac OS X Lion 10.7.4 (11E53) Mini display to DVI adaptor and Acer monitor conected with DVI cable P225HQL

  • Table fields for the text editors

    Hi, How to find the table fields of the text editors in the functional screens like MM03 --> MRP4 View --> Material Memo. Or how to upload text in the editors using ABAP program. Thanks, K R Vishnu Kumar