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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
ooctaviano
Frequent Visitor

Dax Formula

I have this measure formula but for some reason it does not work

M35 Budget Month= sumx(FILTER(Budget,(Budget[Month] = [M34 Month])),Budget[Goal Month])
 
Measure 34 only brings month based on last date selected on slicer
M34 Mes =
VAR _minDate3 = STARTOFMONTH(Calendario[Date])
VAR _maxDate3 = ENDOFMONTH(Calendario[Date])
return month(_maxDate3)

I'm trying to bring the budget for the month on the last date selected on slicer
Please advise
Omar Octaviano
1 REPLY 1
amitchandak
Super User
Super User

@ooctaviano , Not very clear, what output you want. But with help from Date table and time intelligence you can get.

 

Refer these examples

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
this month =MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH('Date'[Date])))
last MTD (complete) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
previous month value =  CALCULATE(sum(''Table''[total hours value]),previousmonth('Date'[Date]))
Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Kudoed Authors