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
joansinho
Advocate I
Advocate I

Current Month Comparison

Hi everyone,
 
I need some help with a calculation. I need to create a new column that shows if an application has been returned the "Current Month." If the application has been returned the current month, it should be "YES." If an application has been returned in past months it should be "RESET," and if it has not been returned it should be "NO."
Example of what I need:
image.png
 
I am trying to use this formula, but I am not getting the result I need
 
Formula: 
 
Aplication Returned = If(Contact[Most Recent Aplication return]= BLANK(), "NO", IF(Contact[Most Recent Aplication return] = date(year(today()),month(today())-1,1), "YES", "RESET"))
 
The result I get: 
 
image.png
 
It must be something simple I am missing, but I can't seem to figure out.
 
Thank you in advance.
1 ACCEPTED SOLUTION
jthomson
Solution Sage
Solution Sage

Think your IF statement is using incorrect logic, by the looks of thing it's only going to return yes if your return date is exactly the first of the previous month. Why not try something like:

 

Returned = var todaysdate = today()

if ([recentreturn] = blank(), "no", if (month([recentreturn])=month(todaysdate)&&(year([recentreturn])=year(todaysdate),"yes","reset")

 

i.e. compare the year and the month of your column to the year and the month of today and see if they both match

View solution in original post

4 REPLIES 4
jthomson
Solution Sage
Solution Sage

Think your IF statement is using incorrect logic, by the looks of thing it's only going to return yes if your return date is exactly the first of the previous month. Why not try something like:

 

Returned = var todaysdate = today()

if ([recentreturn] = blank(), "no", if (month([recentreturn])=month(todaysdate)&&(year([recentreturn])=year(todaysdate),"yes","reset")

 

i.e. compare the year and the month of your column to the year and the month of today and see if they both match

Hi @jthomson!

 

Thank you for the response!

 

Your formula worked as expected.

 

v-lili6-msft
Community Support
Community Support

hi, @joansinho

Your image file is damaged, please upload again.

 

Best Regards,

Lin

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

What I need!What I need!

 

@v-lili6-msft

 

Thank you! I am uploading new pictures.

 

What I get with the formula I am usingWhat I get with the formula I am using

 

 

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!

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.