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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
EnrichedUser
Helper III
Helper III

Running Total over 100k Rows - Not Enough Memory

Hi All,

 

I am trying to determine the running total for a messure called [Inventory Value].

 

It is too slow and will not process. 

 

 

 

Running Total = 
VAR InvRank =
        RANKX(
            ALLSELECTED(Inventory[ItemID]),
                [Inventory Value],,
                DESC,Dense
        )
VAR RunningTotal =
    CALCULATE(
        [Inventory Value],
        FILTER(
            ALLSELECTED(Inventory[ItemID]),
            InvRank >= RANKX(
                    ALLSELECTED(Inventory[ItemID]),
                    [Inventory Value],,
                    DESC,Dense
                    )
        )
    )
RETURN
IF([Inventory Value] <> BLANK(),
RunningTotal)

 

 

Sample Table:

ItemIDCOGSQTYBranchID
10115AB01
101112AB02

103

243

AB02

104323AB01

 

I have on the order of 100 thousand unique part numbers. I am using all selected to record the information by BranchID. 

 

Note: no other visuals/reports have this problem. Everything else has less than a 480 ms load time after clearing the cache. 

1 REPLY 1
Anonymous
Not applicable

Hello @EnrichedUser 
You may try by calculating the InvRank in the calculated column and used that column in the measure.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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