cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

1)

Recoveries No Successful Recoveries Uninsured Loss =
CALCULATE (
COUNTROWS ( 'Main Claim Data' ),
FILTER (
'Main Claim Data',
&& 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
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 ) )

Responsive Resident

Thank you so much @amitchandak

2 REPLIES 2
Responsive Resident

Thank you so much @amitchandak

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 ) )