Skip to Content
0

how to find a particular value occurrence count

Sep 08, 2017 at 06:23 PM

66

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Abhilash Kumar
Sep 09, 2017 at 06:36 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Abhilash Kumar
Sep 08, 2017 at 10:11 PM
0

Hi,

Please provide more information.

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

Is this is Crosstab?

-Abhilash

Show 1 Share
10 |10000 characters needed characters left 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.

0
Dell Stinnett-Christy Sep 12, 2017 at 11:14 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded