Don't count cell B if data in Cell I is the same month - Dashboard

kryshawk

New Member
Joined
Mar 23, 2017
Messages
6
I'm building an interactive dashboard with slicers and pivot tables. My challenge is that I have two columns with dates. I need to calculate how many dates in the second column have a future date in the next month based on the referral date. Example below. What I'm trying to achieve is to show that if I do a slicer for the month of February, it will show the number 1 in future start date in my cell on my dashboard. In April it will show 0 because they both started in the same month. May would show 1. So essentially I need assistance on how I "don't count cell A if its the same month as cell B" using pivot/slicers. Is it possible?
[TABLE="width: 500"]
<tbody>[TR]
[TD]Referral Date[/TD]
[TD]Assigned Start Date[/TD]
[/TR]
[TR]
[TD]02/02/17[/TD]
[TD]03/03/17[/TD]
[/TR]
[TR]
[TD]04/04/17[/TD]
[TD]04/20/17[/TD]
[/TR]
[TR]
[TD]04/05/17[/TD]
[TD]04/20/17[/TD]
[/TR]
[TR]
[TD]05/01/17[/TD]
[TD]06/20/17[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
If i correctly interpret your data , is that what you want ?
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Referral Date[/TD]
[TD]Assigned Start Date[/TD]
[TD]Result[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]02 Feb 17[/TD]
[TD]03 Mar 17[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]04 Apr 17[/TD]
[TD]20 Apr 17[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]05 Apr 17[/TD]
[TD]20 Apr 17[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]01 May 17[/TD]
[TD]20 Jun 17[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]

if yes, then formula for C2 --> =COUNTIFS($B$2:$B$5,">="&(DATE(YEAR(A2),MONTH(A2)+1,DAY(A2)))-DAY(DATE(YEAR(A2),MONTH(A2)+1,DAY(A2)))+1,$B$2:$B$5,"<="&(EOMONTH(EDATE(A2,1),0)))

thanks
 
Upvote 0
Yes. So my next question would be does it have to be a formula or is there a way that it can be a pivot table?
 
Upvote 0
I am not sure if this can be achieved via pivot table, have not tried yet. May be possible by including calculated fields in pivot, will have to wait for the expert members to reply on this.
 
Upvote 0
Hi,

Paste this formula in C =IF(TEXT(A2,"mm-yy")=TEXT(B2,"mm-yy"),0,1)

and then sum the Column C in pivot table, it will sum all the values where month is equal
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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