Countifs or sumproducts with date in Power Pivot

reggieneo

New Member
Joined
Jun 27, 2017
Messages
26
Hi All,
How can I do Countifs or Sumproduct of dates in dax/power pivot?

I have multiple columns with 2 dates columns.
I need to count the rows that meets the 2 dates criteria of status.

Criteria and objective: Count the rows if reported date is before status date; and other criteria is the current row of status date.

my data model has date table.


My challenge is getting the current row in Status date as criteria. Please see the sample data for more reference.

Reported DateStatus DateCountifsResults
6/1/20196/10/2019=COUNTIFS($A$2:$A$20,"<"&B2,$B$2:$B$20,B2)2
6/2/20196/4/2019=COUNTIFS($A$2:$A$20,"<"&B3,$B$2:$B$20,B3)1
6/2/20196/3/2019=COUNTIFS($A$2:$A$20,"<"&B4,$B$2:$B$20,B4)1
6/6/20196/10/2019=COUNTIFS($A$2:$A$20,"<"&B5,$B$2:$B$20,B5)2
6/6/20196/6/2019=COUNTIFS($A$2:$A$20,"<"&B6,$B$2:$B$20,B6)0

<tbody>
</tbody>


much thanks
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,215,824
Messages
6,127,107
Members
449,358
Latest member
Snowinx

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