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
frenst
Frequent Visitor

Help - Cummulative measure - doesent restart, w/ no date field

Hello friends,

 

I have problem, I am constructing a measure that cumulate the sum of something, with this formula, BUT it doesent restart with every year:

 

 

 

ACUM META = 
CALCULATE(
	[MC_CANT VENTAS PRESUPUESTADAS POR CATEGORIA];
	FILTER(
		ALL(DIM_PERIODO_COMERCIAL);
		DIM_PERIODO_COMERCIAL[ANNO_COMERCIAL]<=MAX(DIM_PERIODO_COMERCIAL[ANNO_COMERCIAL])))

 

 

 

CUMMULATIVE.png

 

 I am working with Direct Query. In my "time" dimension I dont have a date field.

An example of my "time" dimension:

PERIODO COMERCIAL DIMENSION.png

 

Thanks a lot if you can help me

 

Cheers 

 

Fred

 

 

 

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hello

Enter a calculated column formula to create a Date field. This can also be achieved in Query Editor, but I'm not sure if it's allowed in direct query mode

Closes 1*("1/"&Datos[Mes_Comercial]&"/"&[Anno Comercial])

Create a relationship from this Date column to the Date column of the calendar table.

Write this measure

ACUM META - CALCULATE([MC_CANT SALES BUDGETED BY CATEGORY];DATESYTD(Calendar[Date],"31/12"))

I hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
v-lid-msft
Community Support
Community Support

Hi @frenst ,

 

We can use following measure to meet your requirement:

 

ACUM META =
CALCULATE (
    [MC_CANT VENTAS PRESUPUESTADAS POR CATEGORIA];
    FILTER (
        ALL ( DIM_PERIODO_COMERCIAL );
        DIM_PERIODO_COMERCIAL[ANNO_COMERCIAL]
            <= MAX ( DIM_PERIODO_COMERCIAL[ANNO_COMERCIAL] )
            && DIM_PERIODO_COMERCIAL[ANNO_COMERCIAL]
                >= ROUNDDOWN ( MAX ( DIM_PERIODO_COMERCIAL[ANNO_COMERCIAL] ) / 100; 0 ) * 100 + 1
    )
)


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
Super User
Super User

Hello

Enter a calculated column formula to create a Date field. This can also be achieved in Query Editor, but I'm not sure if it's allowed in direct query mode

Closes 1*("1/"&Datos[Mes_Comercial]&"/"&[Anno Comercial])

Create a relationship from this Date column to the Date column of the calendar table.

Write this measure

ACUM META - CALCULATE([MC_CANT SALES BUDGETED BY CATEGORY];DATESYTD(Calendar[Date],"31/12"))

I hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks, the logic you propose worked fine. I construct another time dimension with the date field, then create a relationship with my table, and create a new measure that cummulate fine.

 

Thanks

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors