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 Date Status Date Countifs Results
6/1/2019 6/10/2019 =COUNTIFS($A$2:$A$20,"<"&B2,$B$2:$B$20,B2) 2
6/2/2019 6/4/2019 =COUNTIFS($A$2:$A$20,"<"&B3,$B$2:$B$20,B3) 1
6/2/2019 6/3/2019 =COUNTIFS($A$2:$A$20,"<"&B4,$B$2:$B$20,B4) 1
6/6/2019 6/10/2019 =COUNTIFS($A$2:$A$20,"<"&B5,$B$2:$B$20,B5) 2
6/6/2019 6/6/2019 =COUNTIFS($A$2:$A$20,"<"&B6,$B$2:$B$20,B6) 0

much thanks