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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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