Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
GH21
Frequent Visitor

Calculate amount of contracts expiring in next 5 months

Hi All,

 

I'm keen to find an answer for a measure to calculate the amount of contracts expiring from today's date over to the next 5 months. 

 

Thank you in advance!

4 REPLIES 4
v-shex-msft
Community Support
Community Support

HI @GH21 

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If the above doesn't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

In addition, you can also try to use the following measure formula if helps:

ExpiringContracts =
VAR cDate = TODAY ()
RETURN
    CALCULATE (
        COUNT ( Table[ContractID] ),
        FILTER (
            ALLSELECTED ( Table ),
            [Date] >= cDate
                && [Date]
                    <= DATE ( YEAR ( cDate ), MONTH ( cDate ) + 5, DAY ( cDate ) )
        )
    )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
ssethia91
New Member

Try this
 
ExpiringContracts = CALCULATE(COUNTROWS(financials),DATESBETWEEN(financials[Date],today(),EOMONTH(TODAY(),5)))
GH21
Frequent Visitor

Hi @Alf94 

 

Due to the sensitivity of the work, unfortunately I can't share data but in total there is 91 contracts expiring throughout 2023. Is it possible to calculate how many will expire over the next 5 months using the expiry dates?

Alf94
Solution Supplier
Solution Supplier

Hi @GH21 ,

 

Can you share some dummy data so that we can help you better?

 

Thank you,

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.