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
spandy34
Responsive Resident
Responsive Resident

DAX Commands Current Month

I have three DAX Statements and I would like to include results for the current month.  Please can someone tell me how to amend to reflect this please - based on the Notification Date - I have a FinCalendar Table which is my calendar table see diagram below 

 

spandy34_0-1645611123507.pngspandy34_1-1645611134907.png

 

 

1)
 
Recoveries No Successful Recoveries Uninsured Loss =
CALCULATE (
COUNTROWS ( 'Main Claim Data' ), 
FILTER (
'Main Claim Data',
'Main Claim Data'[ClassOfBusinessCode] = "OT"
&& CONTAINSSTRINGEXACT ( [PolicyCode], "REC" ))
 
 
2)
Amount Recovered Uninsured Loss £ = CALCULATE(SUM('Main Claim Data'[Net]),'Main Claim Data'[ClassOfBusinessCode] = "OT" && 'Main Claim Data'[REC_Code_Column] > 0)
 
3)
Team Fee Income Uninsured Loss £ = CALCULATE(SUM('Main Claim Data'[Net]),'Main Claim Data'[ClassOfBusinessCode] = "OT" && 'Main Claim Data'[REC_Code_Column] > 0 && 'Main Claim Data'[ADMIN_Code_Column] >0)
 
 
 
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@spandy34 , For a selected month time intelligence and date table

example

 

MTD Sales = CALCULATE([Recoveries No Successful Recoveries Uninsured Loss],DATESMTD('Date'[Date]))

 

 

This month Today =
var _min = eomonth(today(),-1)+1
var _max = eomonth(today(),0) //today()
return
CALCULATE([Recoveries No Successful Recoveries Uninsured Loss], FILTER(ALL('Date'),'Date'[Date] >= _min && 'Date'[Date] <=_max ) )

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

View solution in original post

spandy34
Responsive Resident
Responsive Resident

2 REPLIES 2
spandy34
Responsive Resident
Responsive Resident

Thank you so much @amitchandak

 

amitchandak
Super User
Super User

@spandy34 , For a selected month time intelligence and date table

example

 

MTD Sales = CALCULATE([Recoveries No Successful Recoveries Uninsured Loss],DATESMTD('Date'[Date]))

 

 

This month Today =
var _min = eomonth(today(),-1)+1
var _max = eomonth(today(),0) //today()
return
CALCULATE([Recoveries No Successful Recoveries Uninsured Loss], FILTER(ALL('Date'),'Date'[Date] >= _min && 'Date'[Date] <=_max ) )

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

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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