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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
PhoebeK
New Member

Issues with EOMONTH

This formula: 

Assigned last year =
CALCULATE([Case count],
USERELATIONSHIP('calendar'[Dates],'All cases combined'[Date assigned]),
DATESINPERIOD('All cases combined'[Date assigned],
EOMONTH(TODAY(), -1),
-12, MONTH)
 
is returning this visual:
PhoebeK_0-1646324181278.png

 

 This tweak to the formula:
Assigned last year =
CALCULATE([Case count],
USERELATIONSHIP('calendar'[Dates],'All cases combined'[Date assigned]),
DATESINPERIOD('All cases combined'[Date assigned],
EOMONTH(TODAY(), -2),
-12, MONTH)
 
returns this visual:
PhoebeK_1-1646324308126.png

 

I know I have February in my data set. Why is this happening? How can I fix it?

4 REPLIES 4
johnt75
Super User
Super User

Try changing the DATESINPERIOD function to use the 'calendar'[Dates] column instead of the column from your data table

v-yanjiang-msft
Community Support
Community Support

Hi @PhoebeK ,

There is no problem with the formula itself, the specific reason needs to be combined with the relationship between your data.

If your problem hasn't been solved, could you please provide more about your sample? It will help find the problem faster.

 

Best Regards,
Community Support Team _ kalyj

 


 
tamerj1
Super User
Super User

Hi @PhoebeK 

You are utilizing an inactive relationship. Once I strangely faced an issue where the solution was to CROSSFILTER - None the active relationship. Worth nothing to try. 

amitchandak
Super User
Super User

@PhoebeK , there nothing in screenshot one. Screenshot 2 is not having axis. What is missing.

 

eomonth(today(),-2) mean Jan -22 (we are in march now)

and rolling data for 12 month

 

also check

 

Rolling 12 Sales =
var _max = maxx(allselcted(date),date[date]) // or today()
var _min = date(year(_max), month(_max)-12,1)
return
CALCULATE(SUM(Sales[Sales Amount]),filter(date, date[date] <=_max && date[date] >=_min))

 

 

or

 

Rolling 12 Sales =
var _max = eomonth( today() ,-1) //  eomonth( today() ,-2)
var _min = date(year(_max), month(_max)-12,1)
return
CALCULATE(SUM(Sales[Sales Amount]),filter(date, date[date] <=_max && date[date] >=_min))

 

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.