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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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] )
            )
    )
)

Regards
Zubair

Please try my custom visuals

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] ) 


Regards
Zubair

Please try my custom visuals

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.