Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
Solved! Go to Solution.
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.
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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!