cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
almafater2
Helper I
Helper I

Summing until last day of month

Good day,

I trying to create a measure, that calculates the sum of  General Ledger amounts ('GL Entries'[G_LEntries.Amount]) up to the last date of each month, based on column 'GL Entries'[G_LEntries.Posting_Date].

I. e.: on 2020-02-29, it should sum up everything where 'GL Entries'[G_LEntries.Posting_Date] <= than 2020-02-29, on 2020-03-31 'GL Entries'[G_LEntries.Posting_Date] <= than 2020-02-29, and so on for all months.

I am ataching a example PBI file in the link below:

https://www.dropbox.com/s/jlapxus5a3i6kee/Example.pbix?dl=0

Any ideas, how I could achieve the desired result? It should look something like this, but should include all the months, not just the ones with data:

almafater2_0-1623148844487.png

 

1 ACCEPTED SOLUTION
almafater2
Helper I
Helper I

I managed to solve it myself. Used this filter: 

FILTER(ALL(Dates[Date]), Dates[Date] <= MAX(Dates[Date]

View solution in original post

3 REPLIES 3
almafater2
Helper I
Helper I

I managed to solve it myself. Used this filter: 

FILTER(ALL(Dates[Date]), Dates[Date] <= MAX(Dates[Date]

View solution in original post

amitchandak
Super User IV
Super User IV

@almafater2 , datesmtd with a date table

 

example

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))

 

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Thank you, but ir gives the same result:

almafater2_0-1623154293128.png

The result should not be decreasing and should also include months, that do not have data. 

 

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Top Kudoed Authors