Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi everyone.
So I have this sample data.
Table 'Sales'
Rank and Running Sales are calculated columns using the following formulas.
Solved! Go to Solution.
@Anonymous Couple things to try:
Running Sales Column =
VAR __Rank = [Rank]
VAR __Result =
CALCULATE(
SUM( Sales[Sales] ) , ALL( Sales ) , Sales[Rank] <= __Rank
)
RETURN
__Result
Running Sales Colum 2 =
VAR __Rank = [Rank]
VAR __Result =
SUMX(
FILTER( ALL( Sales ) , Sales[Rank] <= __Rank),
[Sales]
)
RETURN
__Result
@Anonymous Couple things to try:
Running Sales Column =
VAR __Rank = [Rank]
VAR __Result =
CALCULATE(
SUM( Sales[Sales] ) , ALL( Sales ) , Sales[Rank] <= __Rank
)
RETURN
__Result
Running Sales Colum 2 =
VAR __Rank = [Rank]
VAR __Result =
SUMX(
FILTER( ALL( Sales ) , Sales[Rank] <= __Rank),
[Sales]
)
RETURN
__Result
Thanks! @Greg_Deckler Second option (with SUMX) worked like a charm, the others did not? Any idea why?
@Anonymous CALCULATE isn't really all that great with single table data models.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!