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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
galvar
Regular Visitor

Measure with a combination of cummulative and monthly totals

Hello, 

 

I need your help in order to calculate a financial ratio that has a cumulative calculation as its numerator and a sum of monthly values as its denominator.

 

galvar_0-1627419349888.png

 

Since I need to filter the page by year and month, when I select a particular month the cumulative calculation does not work ... I used this measure for cumulative (numerator):

 

Utilidad_Acumulada =
 
Utilidad Neta Acumulada =
CALCULATE( [Total Utilidad x Distribuir (H)],
    FILTER( ALLSELECTED( Calendario ),
        Calendario[Date] <= MAX( Calendario[Date] ) ))
 
Thanks in advanced
3 REPLIES 3
galvar
Regular Visitor

You are right, [Total Utilidad x Distribuir (H)] is a measure, as a matter of fact, it is the one I would like to accumulate.

When I use a graph sort of visual, the calculation works perfectly, it spreads the total and the accumulated total perfectly through the time span.

 

The problem is when I try to put the calculation in a card type of visual, and I apply month filters. There is something in the context that I could not resolve yet.

 

Thank you for your response!

Hi,

I am not sure whom you are replying to.  My measure should work provided you select a month and a year (in 2 slicers).


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

Hi,

Something like this should work to get you the YTD total (year end is assumed as 31 December)

Utilidad Neta Acumulada = CALCULATE([Total Utilidad x Distribuir (H)],DATESYTD(Calendario[Date],"31/12"))
My assumption is that [Total Utilidad x Distribuir (H)] is a measure.

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.