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
I want to create the cumulative total based on the rank (in this case a Measure Count), unfortunately I can't get it to work with this attempt. I always get the total and not the running total.
Do you have any idea how to do it?
Lines_Cum =
VAR CURRENTRANK = [COUNT]
RETURN
SUMX(
FILTER(
ALL(FAKTWA_DAT),
Currentrank <= MAXX(FaktWA_DAT,[Count])
),
[LINES]
)
COUNT = RANKX(ALL(FaktWA_DAT),[AS_Index],,ASC,DENSE)-1
@Anonymous Try:
Lines_Cum =
VAR CURRENTRANK = [COUNT]
RETURN
SUMX(
FILTER(
ALL(FAKTWA_DAT),
[Count] <= Currentrank
),
[LINES]
)
unfortunately it didn't work, I found another solution. (Index made in PQ and then SUMX with AS_LINES (dynamic Lines) but it only works for counts smaller than 1000. After that, the working memory has problems and displays an error message.
Lines_Cum =
SUMX(
FILTER(
ALL(FAKTWA_DAT),
FaktWA_DAT[Index] <= MAX(FaktWA_DAT[Index])
)
,[AS_Lines]
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 90 | |
| 78 | |
| 66 | |
| 65 |