Solved

# calculate total between start date and last day of current month - DAX (power pivot)

Posted on 2016-09-08
119 Views
I have a traditional sales entries table with balances, due dates etc.

I want to calculate the total balance due between a given start start (e.g 1900) and the last day of the current month.

I know I could use the dates between function like below, however I would need to alter the range every month.

DATESBETWEEN(DateTime[DateKey],
DATE(2007,6,1),
DATE(2007,8,31)
))

How would I change the end date (bold) so that it always refers to the last day of the current month.

Mike
0
Question by:mikes6058
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2
• 2

LVL 51

Expert Comment

ID: 41789486
Hi,

maybe

EOMONTH(TODAY(),0)

Regards
0

Author Comment

ID: 41789535
Hasn't worked for me but I may not be using the corrent syntax

Could you rewrite the formula below.

=CALCULATE('CLE with remaining balances'[Sum of Rem. Amount],DATESBETWEEN('CLE with remaining balances'[Due Date],date(2000,01,01),DATE(2016,09,30)))
0

LVL 51

Accepted Solution

Rgonzo1971 earned 500 total points
ID: 41789544
then try

=CALCULATE('CLE with remaining balances'[Sum of Rem. Amount],DATESBETWEEN('CLE with remaining balances'[Due Date],date(2000,01,01),EOMONTH(TODAY(),0)))
1

Author Closing Comment

ID: 41789606
Brilliant!

Thanks
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

### Suggested Solutions

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
###### Suggested Courses
Course of the Month6 days, 21 hours left to enroll