cancel
Showing results for
Did you mean:
Visitor

Count of active contracts for each month

1Hi everyone,

Can you please help me with this question? I have got list of contracts since 2015 November to 2019 January. There are 2 types of them, active and expired. I need to calculate count of active contracts per month for each year

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

Re: Count of active contracts for each month

Suppose the contracts count is based on the start_date. You can create calculate column using DAX like pattern below:

```result =
CALCULATE (
COUNT ( Table[comment] ),
FILTER (
Table,
YEAR ( Table[start_date] ) = YEAR ( EARLIER ( Table[start_date] ) )
&& MONTH ( Table[start_date] ) = MONTH ( EARLIER ( Table[start_date] ) )
)
)
```

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team

Re: Count of active contracts for each month

Suppose the contracts count is based on the start_date. You can create calculate column using DAX like pattern below:

```result =
CALCULATE (
COUNT ( Table[comment] ),
FILTER (
Table,
YEAR ( Table[start_date] ) = YEAR ( EARLIER ( Table[start_date] ) )
&& MONTH ( Table[start_date] ) = MONTH ( EARLIER ( Table[start_date] ) )
)
)
```

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.