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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Shelley
Post Prodigy
Post Prodigy

Why doesn't replacing TODAY() with an EOM calculation work?

I'm trying to assign a status to a contract, based on the start and end date of the contract. At first I was comparing it to TODAY(), but this is for a report/dashboard that is updated each month, with month-end data, so I wanted the status calculated based on the date of the latest order.

 

So, when I use this expression everything works as expected:

IF('srvc_contr'[contr_ln_itm_lifecyc_stat] = "Cancelled", "Cancelled",
IF(TODAY() >= srvc_contr[Contract End Date], "Complete",
IF(TODAY() < srvc_contr[Contract Start Date], "Future",
"Active")))
 
However, when I use a measure for the end of month, there are no contracts with an Active status. 
IF('srvc_contr'[contr_ln_itm_lifecyc_stat] = "Cancelled", "Cancelled",
IF([End of Current Reporting Month] >= srvc_contr[Contract End Date], "Complete",
IF([End of Current Reporting Month] < srvc_contr[Contract Start Date], "Future",
"Active")))
 
where: 
End of Current Reporting Month =
EOMONTH(MAX(OrdersView[Line_Creation_Date]), 0)
 
Why doesn't this work? Isn't this the same formula, except instead of TODAY, it's using 10/31/2019. What am I missing? Thanks for any help. Could this have anything to do with relationships? the Contracts are linked to the Calendar table by the Contract End Date. In the image below, you can see all of these contracts should have a status of "Active."
Annotation 2019-11-07 103324.png
1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @Shelley 

I make a test as below, but i can't reproduce your priblem, could you show me more details, like:

the relationship between "srvc_contr" and "OrdersView" tables, " Calendar table" and "OrdersView" tables?

Capture4.JPG

Capture5.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

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