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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
RM117
Regular Visitor

Cumlative measure until max dat is reached

Hi all, I've got data in a table called actuals, and a table called Monthly Bud. Also have a Calendar table. I'm trying to do a cumlative total of the Budget table up to and including the latest date of the actuals. As of now I have actuals up to the end of January, soon to be refreshed to include the end of February. The current measure is working fine to the last date, it repeats the 1st date budget. this is the measure;

Measure3 =
var max_date = MAX(Actuals[Postg Date])
RETURN
CALCULATE(SUM('Monthly Bud'[Bud Mthly]),
DATESYTD('Calendar'[Date]),'Calendar'[Date] <= max_date)
What comes out of that is;
 
Month Year   Bud Mthly   Measure 3

Apr 2023        100              100

May 2023       100              200

Jun 2023        100               300

.

.

.

Dec 2023       100              900

Jan 2024        100              100

 

It may have something to do with Jan being a new year?

Any suggestions would be very much appreciated.

 

Thanks in advance;

Kevin

1 ACCEPTED SOLUTION
JamesFR06
Resolver IV
Resolver IV

HI

 

Please try this measure.

JamesFR06_0-1709574455750.pngJamesFR06_1-1709574496525.png

Budget Cumul =
VAR Period =
SELECTEDVALUE ( 'Date'[Année Mois] )
VAR MinDate =
DATE ( YEAR ( Period ), 1, 1 )
VAR MaxDate =
CALCULATE ( MAX ( 'Date'[Date] ), 'Date'[Année Mois] = Period )
RETURN
CALCULATE (
SUM ( Budget[Amount] ),
ALL ( 'Date' ),
'Date'[Date] >= MinDate
&& 'Date'[Date] <= MaxDate
)

View solution in original post

1 REPLY 1
JamesFR06
Resolver IV
Resolver IV

HI

 

Please try this measure.

JamesFR06_0-1709574455750.pngJamesFR06_1-1709574496525.png

Budget Cumul =
VAR Period =
SELECTEDVALUE ( 'Date'[Année Mois] )
VAR MinDate =
DATE ( YEAR ( Period ), 1, 1 )
VAR MaxDate =
CALCULATE ( MAX ( 'Date'[Date] ), 'Date'[Année Mois] = Period )
RETURN
CALCULATE (
SUM ( Budget[Amount] ),
ALL ( 'Date' ),
'Date'[Date] >= MinDate
&& 'Date'[Date] <= MaxDate
)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.