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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Selded
Helper III
Helper III

Flag Latest Month True in my date Column

Hi All, 

 

Kindly assist me write a calculated column in my date table that will return latest month true. i will use this as a filter in my report to return values for only lastest month in my visuals. Below is a **bleep** of my date table.

Selded_0-1598001874187.png

Thanks for the help.

 

1 ACCEPTED SOLUTION
lkalawski
Super User
Super User

Hello @Selded ,

You can use this calculated column:

Latest month = 
IF (DATE(YEAR(TODAY()), MONTH(TODAY()) - 1, 1) = STARTOFMONTH('Date'[Date]), "Latest Month")
 
Current month = 
IF (DATE(YEAR(TODAY()), MONTH(TODAY()), 1) = STARTOFMONTH('Date'[Date]), "Current Month")
 



_______________
If I helped, please accept the solution and give congratulations! 😀

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Selded ,  Hope I get it correctly. You need to add a column like this in the date table

Month Type = Switch( True(),
Date([Date]) = eomonth(Today(),-1),"Last Month" , //Last Month
Date([Date])= eomonth(Today(),0),"This Month" , //This Month
[Month Year]
)

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
lkalawski
Super User
Super User

Hello @Selded ,

You can use this calculated column:

Latest month = 
IF (DATE(YEAR(TODAY()), MONTH(TODAY()) - 1, 1) = STARTOFMONTH('Date'[Date]), "Latest Month")
 
Current month = 
IF (DATE(YEAR(TODAY()), MONTH(TODAY()), 1) = STARTOFMONTH('Date'[Date]), "Current Month")
 



_______________
If I helped, please accept the solution and give congratulations! 😀

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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