cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
Omar Octaviano
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]))
``````

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors