Skip to Content
avatar image
Former Member

how to find a particular value occurrence count

How to count the occurrence of a value in column and calculate the total down

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 09, 2017 at 06:36 AM

    Hi,

    Try this please:

    1. Right click the Total cell on the last row and select Calculated Member > Insert Child.

    2. A new blank Row should be inserted at the very beginning of the crosstab.

    3. Right-click the blank white space to the top left of the crosstab > Advanced Calculations > Calculated Member.

    Under 'Properties' set the 'Insert Evaluation' to 'After'.

    This should move the new blank row to the bottom of the Crosstab just above the Total Row.

    4. Right-click one of the blank 'summary cells' in this new row > Calculated Member > Edit Calculation Formula and use this code:

    local numbervar i; 
    local numbervar cnt; 
    for i := 0 to CurrentRowIndex - 1 do 
    ( 
       if GridValueAt(i, CurrentColumnIndex, CurrentSummaryIndex) = 'A' then 
       cnt := cnt + 1; 
    ); 
    totext(cnt,'#')

    5. On that same row, right-click the blank Row cell > Calculated Member > Edit Header Formula > Type in a label:

    "Total"

    6. Right-click the original Total Row, which is the last row, select "Row Grand Totals" > Suppress Grand Totals.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 08, 2017 at 10:11 PM

    Hi,

    Please provide more information.

    From that screenshot, which value do you wish to count for?

    Is this is Crosstab?

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      i want the count for A (Absent),

      1. The count from every column to be dislplayed at the bottom as no of absentees

      2. and at the top i want to get date in ascending order , but for me getting the month is not in proper order jul, aug and again july so there is no format in the report.

  • Sep 12, 2017 at 11:14 PM

    To get the month in the proper order, you need to use an actual date or date/time field in the crosstab. You then format the column header to display the date and time correctly.

    -Dell

    Add comment
    10|10000 characters needed characters exceeded