count formula for pivot table

faizee

Board Regular
Joined
Jan 28, 2009
Messages
214
Office Version
  1. 2016
Platform
  1. Windows
I need the calculate formula for pivot table


there are numbers and "Absent" in the fields,,. so i want to count "absent"

field name is "time-in"
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
[TABLE="width: 261"]
<TBODY>[TR]
[TD]Card no[/TD]
[TD]Date[/TD]
[TD]time in[/TD]
[TD]Time out[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]1-Feb-12[/TD]
[TD="align: right"]11:23[/TD]
[TD="align: right"]19:34[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]2-Feb-12[/TD]
[TD]absent[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="align: right"]1-Feb-12[/TD]
[TD="align: right"]6:44[/TD]
[TD="align: right"]20:33[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]5-Feb-12[/TD]
[TD="align: right"]9:00[/TD]
[TD="align: right"]18:22[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]6-Feb-12[/TD]
[TD]absent[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="align: right"]17-Mar-12[/TD]
[TD="align: right"]8:34[/TD]
[TD="align: right"]19:00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 3"]count "absent" in (time In)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 2"]in pivot table[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Card no[/TD]
[TD="align: right"]12-Feb[/TD]
[TD="align: right"]12-Mar[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[/TR]
</TBODY><COLGROUP><COL><COL><COL span=2></COLGROUP>[/TABLE]
 
Upvote 0
[TABLE="width: 261"]
[TR]
[TD]Card no[/TD]
[TD]Date[/TD]
[TD]time in[/TD]
[TD]Time out[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]1-Feb-12[/TD]
[TD="align: right"]11:23[/TD]
[TD="align: right"]19:34[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]2-Feb-12[/TD]
[TD]absent[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="align: right"]1-Feb-12[/TD]
[TD="align: right"]6:44[/TD]
[TD="align: right"]20:33[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]5-Feb-12[/TD]
[TD="align: right"]9:00[/TD]
[TD="align: right"]18:22[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]6-Feb-12[/TD]
[TD]absent[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="align: right"]17-Mar-12[/TD]
[TD="align: right"]8:34[/TD]
[TD="align: right"]19:00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 3"]count "absent" in (time In)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 2"]in pivot table[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Card no[/TD]
[TD="align: right"]12-Feb[/TD]
[TD="align: right"]12-Mar[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[/TR]
[/TABLE]

Add another column which count the number of absent:
Excel Workbook
ABCDE
1Card noDatetime inTime outAbsent
21101-Feb-1211:2319:340
31102-Feb-12absent1
41001-Feb-1206:4420:330
51105-Feb-1209:0018:220
61106-Feb-12absent1
71017-Mar-1208:3419:000
8
9
10
11
12Sum of AbsentColumn Labels
13Row LabelsFebMar
14112
151000
Sheet3
 
Upvote 0
ooh thats a good idea,

thanks
i just to ask, cant we directly put count or vlookup formula in pivot table --> formula--> calcuated field
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top