Count Number of Occurrences in a Column

Hi,
I'm trying to create a Project-Level custom field that will calculate if another custom field calculates as "Past Due" more than X number of times (10 for example here) this formula would be used to show a Project-Level Status indicator to catch
the attention of the schedulers to remind them they need to update their timelines.  After some searching on here, I've found there isn't a simple Count if function in Project.
Here's the gist of what I'm looking to create a formula for:
IIF (Count [column custom] = "Past Due" >=10 , "Option1 Proj Late"....
-OR- 
IIF( [Finish] < (Now()) >=10 times, "Option1 Proj Late" ... 
Here's the formula for the "custom column" if there is an easier workaround than the way I'm looking into this:
IIf([% Complete] = 100, "Complete", IIf([Finish] < (Now()), "Past due", IIf([Finish] < (Now() + 14), "Almost Due", "Future")))
Any and all input would be greatly appreciated.
Kind regards,
Mike

Mike,
Here's something you could try. I haven't tried it but in theory it should work.
1. Set up a custom number field number field to  yield a value of "1" for any tasks that have "past due" in your custom column
2. Set the calculation for task and group summary lines to be the "sum" of the custom number field
3. Create a custom text field that tests for a value of 10 or greater in the custom number field
The above will give you the alert you want in the custom text field on the Project Summary line.
Hope this helps.
John

Similar Messages

  • Hi Gurus! how to count number of records in any column of ALV Grid report

    Hi Guys!
    I want to know how can we count the number of records in any column selected by the user. Like for oe customer there might be 20 sale order that means for 10 customer there will be 200 Sale order. So if i select cutomer number column ti should give 10 out put and whern select sale order it should give 200 as output.
    -Anurag Jain

    Hi,
    Either you can use the hotspot_click event or double_click to show the Pop-up info of the Sales Order count or customer Count depending on the selection.
    In the hotspot_click event  method you have E_ROW_ID E_COLUMN_ID..using these you can find the Sales Ordert or customer Number.. Loop the internal table and find the Count.
    In the double_click event  method you have E_ROW E_COLUMN..using these you can find the Sales Ordert or customer Number.. Loop the internal table and find the Count.

  • How to count number of occurrence​s

    Hello all,
    I am new to Labview and programming in general.
    I am making a simple VI that simply simulates a roll of a dice and then outputs how many times the dice fell on a particular value (1-6).
    The input is the amount of times the dice is to be rolled, which I know is simply the number wired to the count terminal of a for loop. I used the random number generator multiplied by 6 and rounded to next highest integer to get numbers between 1 and 6, but how do I record how many times a number occurred for each iteration? I believe I should use 6 numeric indicators for the outputs?
    Do I need to use a shift register?
    Thanks

    RavensFan wrote: Use Replace Array Subset to increase a particular element of the array by 1.
    An array would definately be the best route to go with this.  It's a little more advanced, but I would use the Inplace Element Structure to increment your values.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Want to Count Number of records in one Column in a page

    Hi all,
    According to the requirement I am using format with multiple columns in the report page, i want to count the records in each column, according to the count i want to display one message at the end of the column like "***continue in next column ***" &
    "***continue in next page **" & "*End of Records**"
    Note: My report may contain multiple pages r will end up with only single column
    Can any one help me on this....
    Edited by: Sridhar Naljala on Mar 16, 2009 5:39 PM

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • How to get the total number of occurrences based on the value of a column.

    Hello everyone,
    This is the first time that I will ask question here on your forum but has been following several threads ever since. I guess that now is my turn to ask a question. So anyway here is the thing, I have a query that should return count the number of rows depending on the value of SLOT. Something like this:
    WIPDATAVALUE          SLOT             N            M
    1-2                   TRALTEST43S1     1            3
    1-2                   TRALTEST43S1     2            3
    3                     TRALTEST43S1     3            3
    4-6                   TRALTEST43S2     1            4
    4-6                   TRALTEST43S2     2            4
    4-6                   TRALTEST43S2     3            4
    7                     TRALTEST43S2     4            4-----
    As you can see above, on the SLOT TRALTEST43S1, there are three occurrences so M (Total number of occurrences) should be three and that column N should count it. Same goes with the SLOT TRALTEST43S2. This is the query that I have so far:
    SELECT DISTINCT
    WIPDATAVALUE, SLOT
    , LEVEL AS n
    , m
    FROM
      SELECT
        WIPDATAVALUE
        , SLOT
        , (dulo - una) + 1 AS m
      FROM
        SELECT
          WIPDATAVALUE
          , SLOT
          , CASE WHEN INSTR(wipdatavalue, '-') = 0 THEN wipdatavalue ELSE SUBSTR(wipdatavalue, 1, INSTR(wipdatavalue, '-')-1) END AS una
          , CASE WHEN INSTR(wipdatavalue, '-') = 0 THEN wipdatavalue ELSE SUBSTR(wipdatavalue, INSTR(wipdatavalue, '-') + 1) END AS dulo
        FROM trprinting
        WHERE (containername = :lotID OR SLOT= :lotID) AND WIPDATAVALUE LIKE :wip
    ) CONNECT BY LEVEL <= m
    ORDER BY wipdatavalue;And that it results to something like this:
    WIPDATAVALUE          SLOT             N            M
    1-2                   TRALTEST43S1     1            2
    1-2                   TRALTEST43S1     2            2
    3                     TRALTEST43S1     1            1
    4-6                   TRALTEST43S2     1            3
    4-6                   TRALTEST43S2     2            3
    4-6                   TRALTEST43S2     3            3
    7                     TRALTEST43S2     1            1-----
    I think that my current query is basing its M and N results on WIPDATAVALUE and not the SLOT that is why I get the wrong output. I have also tried to use the WITH Statement and it works well but unfortunately, our system cant accept subquery factoring.
    I know you guys will be helping out because you are all awesome. Thanks everyone
    Edited by: 1001275 on Apr 19, 2013 8:07 PM
    Edited by: 1001275 on Apr 19, 2013 8:18 PM

    Hi,
    Sorry, it's still not clear what you want.
    Are you saying that, given this table:
    CREATE TABLE trprinting
      WIPDATAVALUE       VARCHAR2(255)
    , SLOT               VARCHAR2(255)
    INSERT INTO trprinting (wipdatavalue, slot) VALUES ('1-2',  'TRALTEST43S1');
    INSERT INTO trprinting (wipdatavalue, slot) VALUES ('3',    'TRALTEST43S1');
    INSERT INTO trprinting (wipdatavalue, slot) VALUES ('4-6',  'TRALTEST43S2');
    INSERT INTO trprinting (wipdatavalue, slot) VALUES ('7',    'TRALTEST43S2');you want to produce this output:
    WIPDATAVALUE SLOT                     N          M
    1-2          TRALTEST43S1             1          3
    1-2          TRALTEST43S1             2          3
    3            TRALTEST43S1             3          3
    4-6          TRALTEST43S2             1          4
    4-6          TRALTEST43S2             2          4
    4-6          TRALTEST43S2             3          4
    7            TRALTEST43S2             4          4? If so, here's one way:
    WITH     got_numbers     AS
         SELECT     wipdatavalue
         ,     slot
         ,     TO_NUMBER ( SUBSTR ( wipdatavalue
                               , 1
                           , INSTR ( wipdatavalue || '-'
                                ) - 1
                     )          AS low_number
         ,     TO_NUMBER ( SUBSTR ( wipdatavalue
                               , 1 + INSTR ( wipdatavalue
                     )          AS high_number
         FROM     trprinting
    SELECT       wipdatavalue
    ,       slot
    ,       ROW_NUMBER () OVER ( PARTITION BY  slot
                                 ORDER BY          low_number
                        )                    AS n
    ,       COUNT (*)     OVER ( PARTITION BY  slot )     AS m
    FROM       got_numbers
    CONNECT BY     LEVEL               <= high_number + 1 - low_number
         AND     low_number          = PRIOR low_number
         AND     PRIOR SYS_GUID ()      IS NOT NULL
    ORDER BY  low_number
    ,            n
    ;Much of the complexity here is caused by storing 2 numbers in 1 VARCHAR2 column, wipdatavalue. Relational databases work best when there is no more than 1 item in any given column of any given row. This is so basic to datbase design that it is called First Normal Form. Also, numbers belong in NUMBER columns, not VARCHAR2. If you stored your data like that in the fist place, then you wouldn't need the sub-query I called got_numbers, which is about 60% of the code above. (That could be reduced by replacing SUSTR and INSTR with the less efficient REGEGP_SUBSTR.)

  • How do I count the number of occurrences of a string within a group of cells?

    Hello all, I'm trying to figure out how to count the number of times a child has completed certain tasks.  Here is a sample of the data (it is highly simplified here, but contains what I hope is needed to answer my question):
    Unnamed Table
    Objective
    John
    Ann
    Alex
    Dave
    Eric
    20a 20b 20c
    x
    20a 20b 20c
    x
    20a 20b 20c
    x
    x
    19b 20a
          x
           x
    20c 21b 22
         x
    What I am trying to do is count the number of times each child completed each objective - but I can't figure out how to go about splicing up the "objectives" fields for counting while still being able to compare them to whether or not the "child" has 'an x in the box' in that particular row.

    If I read your example correctly, John's counts should be 2 for 20a, 1 for 19b, 20b and 20c, and 0 for any other objectives listed.
    Here's an example that will work for your data set, assuming that any objective ma occur only once in each row of column A of the Main table. I've added an a to objective 22, but I think it is unnecessary, provided there is no objective 122, 221, etc.
    This uses a two step process.
    The table AUX extracts the objectives completed by each student, using the checkboxes in Main. Note that it also adds a space at the beginning and end of each string. This provides an extra character before the first objective code and after the last objective code in that row, used by the wildcard specification in the formula in the Summary table.
    Formula:
    Aux::B2: =IF(OFFSET(Data :: $A$1,ROW()-1,COLUMN()-1)," "&OFFSET(Data :: $A$1,ROW()-1,0)&" ","")
    Fill right to the last column and down to the last row of Aux.
    Summary uses COUNTIF to count the number of occurrences of each of the objectives listed in column A of that table.
    Formula:
    Summary::B2: =COUNTIF(Aux :: B,"=*"&$A2&"*")
    Fill right and down as the previous formula.
    Regards,
    Barry

  • Count the number of unique values in column

    Hi
    I have a large numbers file (thousands of rows) with data for different dates. I need to calculate the number of unique (distinct) dates are in the spreadsheet.
    Does anyone know how to do this?
    Thanks,
    Bruce

    bpj,
    Let's say your date is in column B for this example and your first data row is Row 2. In another column you can enter into row 2: =IF(COUNTIF($B$2:B2, B)=1, 1, "") Summing the new column content will yield the number if unique dates.
    As badunit observes, this will result in sluggish document. If the number of possible dates is small compared to the number of rows of data, it would be better to make a table of possible dates and count the number of occurrences of each of those dates in the data, a COUNTIF function on the frequency data for the date range will give you the number of unique dates, possible much more efficiently.
    Jerry

  • SSRS- Counting the number of occurrences

    Hi,
    I have table 1 filled with numbers 1-5. I need to count the number of occurrences for each number in table 2.
    For example,
    Table 1
    3
    4
    5
    4
    3
    Table 2 1-- 0 occurrences 
    2-- 0 occurrences
     3-- 2 occurrence
     4-- 2  occurrences
     5-- 1  occurrences
    Can I do this in a SSRS report?
    Thank you in advance!

    Hi Rebecca07,
    After testing the issue in my local environment, we can refer to the steps below to achieve your requirement:
    Drag a table from Toolbox to design surface.
    Delete the detail row (second row) and the third column.
    Right-click the first row to insert five rows after that row.
    Type the following expressions in each cell:
    numbers             occurrences
    1                        =count(iif(Fields!number.Value=1,1,nothing))
    2                        =count(iif(Fields!number.Value=2,1,nothing))
    3                        =count(iif(Fields!number.Value=3,1,nothing))
    4                        =count(iif(Fields!number.Value=4,1,nothing))
    5                        =count(iif(Fields!number.Value=5,1,nothing))
    The following screenshot is for your reference:
    If you have any other questions, please feel free to let me know.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Using count to count the number of occurrences of a primary key

    Hi,
    I'm relatively new to T-SQL and more of a SAS guy.
    I just need to some help.
    I have a table
    CF_ID    Name
    4444     Mark
    4444    Mark
    3321   Sarah 
    All i want to do add in a new column to count the number of occurrence of the CF_ID. So my new table would be:
    CF_ID    Name     New_column
    4444     Mark       1
    4444     Mark       2
    3321     Sarah     1 
    Any help would be gratefully appreciated.
    Thank you
    Umar Javed

    Hello Umar,
    You can use the
    ROW_NUMBER (Transact-SQL) for this:
    SELECT *, ROW_NUMBER() OVER (PARTITION BY CF_ID ORDER BY Name) AS New_Column
    FROM yourTable
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Count the number of occurrence in a string

    is there any api for counting the number of occurrence in a string or should i write a method myself?
    for example. I want to count "." in "1.2.3.4.". i want to count the dot in this string.
    I am just wondering.
    Thanks in advance.

    is there any api for counting the number of
    occurrence in a string or should i write a method
    myself?The latter.

  • 'COUNT' the number of occurrences of a characteristic in BEx

    Good day all.
    3.x BEX.
    I want to count all the occurrences of a " Claim Number" in a BEx query.
    The u201CClaim numberu201D might have several u201Clinesu201D ie : Claim number u201CMMC123u201D has line 1, 2 and 3. I only want to count it as u20181u2019 Dealer claim number, not u20183u2019.
    I have a InfoObject "Counter" in DSO and transformation that counts all the lines, not just the claim numbers. If I set the counteru2019s key figure properties (calculate single value as..) to u2018minimumu2019, I will receive the correct quantity of lines when u201Cclaim numberu201D is displayed in the query results. BUT, I only want to display the total in the query (no detail).
    If I remove the Dealer claim number from the result, then the total displayed includes all the lines for the claim number as well.
    How do I get the correct quantity to display?
    Thanks in advance.
    Cj

    Hi,
    Use exception aggregation for Keyfigure (counter) Properties with referce to the char Claim Number.
    Goto->Counter(KF)Properties->exception aggregationTab-->select refchar(Claim Number)-->ok.
    then u will get aggregation value.
    Hope it willhelp.
    Regards,
    Satya

  • Need help in finding the number of occurrences of a pattern.

    Hi All,
    I need help in finding the number of occurrences of a pattern in a table's column's data.
    Consider sample data - one row's column from a table:
    "S-S-S-A-S-S-P-S-S-B-S-A-P-S-S-C"
    My requirement is:
    I should get the count of S's which are immediately preceded by A or P.
    for the above data i should get count as 3+2+1=6 (S-S-S-A, S-S-P, S-A)
    The pattern data is stored as VARCHAR2 type.
    Thanks in advance,
    Girish G
    Edited by: Girish G on Jul 21, 2011 11:22 PM

    I am sure there exists a better way then this one:
    SQL> with dt as
      2  (select 'S-S-S-A-S-S-P-S-S-B-S-A-P-S-S-C' str from dual)
      3  SELECT SUM(Regexp_count(Regexp_substr(str, '(S\-?)+(A|P)+', 1,
      4                                     Regexp_count(str, '(S\-?)+(A|P)+') - (
      5                                                  LEVEL - 1 )), 'S')) len
      6  FROM   dt
      7  CONNECT BY LEVEL <= Regexp_count(str, '(S\-?)+(A|P)+')
      8  /
           LEN
             6

  • Showing Duplicate records in a report with the count of their occurrence

    Hi Members,
    I am novice to BI. i need your suggestion to achiever one of the functionality. A report is required to be built with columns Incident ID, Task ID, Task Name. The Original report is below:-
    In the above report I have to display only duplicated records once. Distincat records are not required to be shown. That is, if the same no. of Task Name is associated with the same Incident ID then it should be displayed once with the count of their occurrences in a separate column say , Count. For example, the Task 'TASK_MANUAL_KCI'  got 4 times associated with the same Incident ID INC000000001434. Then the report should display this task one time in a report with count 4. Similarly, for INC000000000943 where task 'IPCG Diagnostic Template' got associated 2 times. The Count is 2 for this task.
    Other records should not be displayed in a report.
    Would highly appreciate quick response. Please suggest.
    Thanks,
    Neha Pateria

    I tried this Gill, but result is bit different :-
    Seems some little modifications are needed. Report should be displayed like the below one where it says how many times the same Task is associated with the same incident. Eg. Task 'TASK_CIRCUIT_RESOLVER' is associated with the incident 'INC000000001434' 4 times. 'IPCG Diagnostic Template' is associated with  'INC000000000943' 2 times. Similarly for other records.
    But I really thankful to you for giving me the logic proceed further. I tried  '=RunningCount([Task Name]; Row; ([Task Name]; [Incident ID]))'. It gave me desired results. :-
    But the only thing that needs to be done is to bring the single Task associated with the Incident..
    Thanks,
    Neha Pateria

  • Interactive Reporting - Counting Records in a Non-numeric Column

    I have created a report that shows open trouble tickets, the group they are assigned to and the status of the ticket. I would like to create another report based on the first one that shows each group and the number of tickets they have in each status category. For example:
    Group Assigned Testing Closed Total
    Bus. Analysts 2 5 0 7
    I.T. 6 2 3 11
    Is there a function in IR that can count number of rows/records?

    depending on how you have your data you can use a Pivot section.
    If the data is 1 row = 1 record then add computed column to your results with a static value of 1 and use that as your fact within the pivot with your Ticket Type as a top label and group as a side label.
    Wayne Van Sluys
    TopDown Consulting

  • Counting number of records in a data block

    hi folks,
    Simple question for you guys: How can I count number of records in a data block.
    In other words, say I have 10 detail records listed on a data block (one of my columns is a non-database item for entering a number). Now I just want to do somethin like:
    Select count(*) From <data_block> into lnRecCount
    Where <non-database column> <> 0 ;
    Can I do this in a button trigger? I can't get it to work?
    Thanks,
    bob

    You should make a routine that go through records of the block and count the records that agree with your condition.

Maybe you are looking for

  • How to print an email without printing its attachment?

    Dear All, How can I print an email in my inbox without printing its attachment? I have an email with pdf file attached, when i print this email, the pdf file also print with the main contents of the email. Also, the attachment printed in the same pap

  • 3220 - tesconet

    I have recently purchased a Nokia 3220. I am unable to connect the phone to my PC. I have downloaded the necessary drivers but whenever I try to connect all I get is a message saying enhancements not supported. I know that the drivers and cables work

  • Pausing and restarting closed caption and audio

    Can anyone help me with this issue - I have 2 sets of closed captions on one slide with audio that spans the both closed captions. I pause the audio at the end of closed caption one using a click box, when I restart it by clicking on the click box th

  • Regarding group condition

    hi friends 1.wht is header condition and group condition? 2. what r the condution types for header and group conditions? 3. give me some examples for useful of header condition and group conditon? plz reply me thanks in advance

  • For some reason my email inbox has just deleted everything in my inbox on my phone!!!

    My Iphone just deleted everything in my Inbox??? Does this have something to do with Wi-Fi or SSL??? Help