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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
dhayanithij79
New Member

Cumulative Total for more than 1 dimension

We have "Datacenter" in Rows and "Month-Period" in Column respectivly in crosstab.

Want to display cummulative forecast of storage, compute, backup etc as measures.

Here is the formula I have for displaying the cummulative total.

 

Cumulative Forecast =
CALCULATE (
Sum(Forecast[Total Storage (TB)]),
FILTER (
ALLSELECTED(Forecast),
Forecast[Required Month] <= Max( Forecast[Required Month] )
)
)

 

It works fine but it calculates cummulative total for all datacenter. Want to break it by datacenter. 

Foreach datacenter I want to see cummulative total by period.

Any help will be much appreciated.

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @dhayanithij79,

 

Has your issue been solved by the formula as @Zubair_Muhammad offered? If any question, feel free to let me know please.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Zubair_Muhammad
Community Champion
Community Champion

@dhayanithij79

 

Try adding another filter argument as follows

 

Cumulative Forecast =
CALCULATE (
    SUM ( Forecast[Total Storage (TB)] ),
    FILTER (
        ALLSELECTED ( Forecast ),
        Forecast[Required Month]
            <= MAX (
                Forecast[Required Month]
                    && Forecast[Datacentre] = SELECTEDVALUE ( Forecast[Datacentre] )
            )
    )
)

Thanks for your response, @Zubair_Muhammad I need exactly this and have tried (see below), but I get 

 

"The MAX function only accepts a column reference as an argument"

 

Am I missing something? 

 

CumDAC =
CALCULATE(
sum(FactTable[DAC]),
FILTER(
ALLSELECTED(FactTable),
FactTable[Date]
<=max(
FactTable[Date]
&& FactTable[Policy]=SELECTEDVALUE(FactTable[Policy])
)
)
)

Hi

I notice that you are not closing bracket after max (facttable[date] ) 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.