Excel formula to get number of working days

Copper Contributor

here attached my workbook . i have data table and i have make a pivot table also for it. 

there are machine names entry days and output. every day repeat all machine names but not work all machines. i need to get number of machines work on a day by day on new column in my pivot table

5 Replies

@RavinduF 

Please find the attached with the two Pivot Tables and see if any one of them is what you are trying to achieve.

 

 

@Subodh_Tiwari_sktneer 

thank you for the reply. this is not what i need. i need a pivot table just like your 1st pivot without extracting dates based on machine names. there should be only 6 rows for 6 days and only machine count work on this relevant date ( as a example except "0" output on output column.

@RavinduF 

Forget about the Pivot Table, just mock up the desired output manually based on the sample data in the file to show what exactly you are trying to achieve and upload the file again.

@Subodh_Tiwari_sktneer 

thank you!

 

i like a pivot table like table 3 on the attachment without extracting data and except "0" on output

@RavinduF 

While inserting the Pivot Table, on Create Pivot Table dialog box, check the option at the bottom which says "Add this data to the Data Model.

 

Once the Pivot Table is inserted at the desired destination, right click on Range in the Pivot Table Fields List and choose Add Measure and in the next Measure window, type a Name for the Measure and paste the formula given below in the Formula box and click ok to finish.

Then drag the Dates in the Rows area and New Measure you created in the Values Area.

 

Formula for Measure:

=CALCULATE(COUNTROWS(Range),Range[Output MC]>0)

 

Please refer to the attached for more details where I create a Measure called "Number of Machines".