Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 56 | |
| 47 | |
| 44 | |
| 20 | |
| 20 |
| User | Count |
|---|---|
| 73 | |
| 72 | |
| 34 | |
| 33 | |
| 31 |