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
RogueTrooper
Regular Visitor

Calculate sum based on end of month date

Hi.  I'm having an anoying error with my current formula.

 

The idea is to calulate the value of shipped orders upto and including the current month.

 

Error reported is "Too few arguments were passed to the EOMONTH function.  The minimum argument count for the function is 2"

 

Formula:

ALL OS VALUE PERIOD = CALCULATE(SUM(MNSalesOrderLine[OS LCY Value]),

FILTER(MNSalesOrderLine,MNSalesOrderLine[Shipment_Date] <=EOMONTH(MAX(LastRefreshedDate[DateLastRefreshed],0)
 
Any thoughts?
 
Regards
 
Wayne
 
1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Like this

<=EOMONTH(MAX(LastRefreshedDate[DateLastRefreshed]),0)

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Like this

<=EOMONTH(MAX(LastRefreshedDate[DateLastRefreshed]),0)

Excellent!

 

Thanks for taking the time to help resolve this.

tamerj1
Super User
Super User

@RogueTrooper 

You forgot to colse MAX before ",0"

Hi.  Thanks for the quick reponse.

 

Not sure I quite understand.  Do you mean is should end:

<=EOMONTH(MAX(LastRefreshedDate[DateLastRefreshed]",0")
as the system reports an syntax error on ",0"
 
Regards
 
Wayne

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.