Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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:
ItemID | COGS | QTY | BranchID |
101 | 1 | 5 | AB01 |
101 | 1 | 12 | AB02 |
103 | 2 | 43 | AB02 |
104 | 3 | 23 | AB01 |
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.
Hello @EnrichedUser
You may try by calculating the InvRank in the calculated column and used that column in the measure.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
11 | |
10 | |
10 | |
10 |
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
8 |