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.
[TABLE="width: 567"]
<tbody>[TR]
[TD]Reported Date[/TD]
[TD]Status Date[/TD]
[TD]Countifs[/TD]
[TD]Results[/TD]
[/TR]
[TR]
[TD="align: right"]6/1/2019[/TD]
[TD="align: right"]6/10/2019[/TD]
[TD]=COUNTIFS($A$2:$A$20,"<"&B2,$B$2:$B$20,B2)[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]6/2/2019[/TD]
[TD="align: right"]6/4/2019[/TD]
[TD]=COUNTIFS($A$2:$A$20,"<"&B3,$B$2:$B$20,B3)[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]6/2/2019[/TD]
[TD="align: right"]6/3/2019[/TD]
[TD]=COUNTIFS($A$2:$A$20,"<"&B4,$B$2:$B$20,B4)[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]6/6/2019[/TD]
[TD="align: right"]6/10/2019[/TD]
[TD]=COUNTIFS($A$2:$A$20,"<"&B5,$B$2:$B$20,B5)[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]6/6/2019[/TD]
[TD="align: right"]6/6/2019[/TD]
[TD]=COUNTIFS($A$2:$A$20,"<"&B6,$B$2:$B$20,B6)[/TD]
[TD="align: right"]0[/TD]
[/TR]
</tbody>[/TABLE]
much thanks
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.
[TABLE="width: 567"]
<tbody>[TR]
[TD]Reported Date[/TD]
[TD]Status Date[/TD]
[TD]Countifs[/TD]
[TD]Results[/TD]
[/TR]
[TR]
[TD="align: right"]6/1/2019[/TD]
[TD="align: right"]6/10/2019[/TD]
[TD]=COUNTIFS($A$2:$A$20,"<"&B2,$B$2:$B$20,B2)[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]6/2/2019[/TD]
[TD="align: right"]6/4/2019[/TD]
[TD]=COUNTIFS($A$2:$A$20,"<"&B3,$B$2:$B$20,B3)[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]6/2/2019[/TD]
[TD="align: right"]6/3/2019[/TD]
[TD]=COUNTIFS($A$2:$A$20,"<"&B4,$B$2:$B$20,B4)[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]6/6/2019[/TD]
[TD="align: right"]6/10/2019[/TD]
[TD]=COUNTIFS($A$2:$A$20,"<"&B5,$B$2:$B$20,B5)[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]6/6/2019[/TD]
[TD="align: right"]6/6/2019[/TD]
[TD]=COUNTIFS($A$2:$A$20,"<"&B6,$B$2:$B$20,B6)[/TD]
[TD="align: right"]0[/TD]
[/TR]
</tbody>[/TABLE]
much thanks