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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
lboldrino
Resolver I
Resolver I

Sum Row by Row with sort Value over Col

lboldrino_0-1618301487709.png

i need  to calcute sum MSR count Tickets row by rows. 

0,5h = 326

1 h must be 326 + 227 = 526

how can i calcute sum my rows with order value as sort asc?  the table is sorted by value order

here is my measure, but this ignore my sort col "order"

 

MRS Running Total = 
var _ResolvesClsuter = [MSR count tickets]  

return 
sumx(filter(SUMMARIZE(allselected(fact_ticket_stats),dim_resolvetime_cluster[resolvetime_cluster_key],
"Tickets", [MSR count tickets]),
[Tickets] >= _ResolvesClsuter ),
[Tickets])

 

1 ACCEPTED SOLUTION

The formula below should work for your model.

 

MRS Running Total =
VAR currDisplayValue =
MAX ( 'dim_resolvetime_cluster'[Order] )
VAR result =
CALCULATE (
[MSR Count Tickets],
ALL ( 'dim_resolvetime_cluster' ),
'dim_resolvetime_cluster'[Order] <= currDisplayValue
)
RETURN
IF ( HASONEFILTER ( dim_resolvetime_cluster[Display] ), result, BLANK () )

 

View solution in original post

4 REPLIES 4
MikeJohnsonZA
Responsive Resident
Responsive Resident

Hi

 

Its not clear what you underlying model looks like but I have assumed that your 'dim_resolvetime_cluster' table has a column for the order and that this is not a measure. the following measure should work for you once you update with the appropriate column and table names

 


MRS Running Total =
VAR currDisplayValue = MAX ( 'Fact_ticket_stats'[Order] )
VAR result =
CALCULATE (
SUM ( Fact_ticket_stats[MSR Count Tickets] ),
ALL ( 'Fact_ticket_stats' ),
'Fact_ticket_stats'[Order] <= currDisplayValue
)
RETURN
IF ( HASONEFILTER ( Fact_ticket_stats[Display] ), result, BLANK () )

 

order is not a measure but [MSR Count Tickets] is a measure. 

 

lboldrino_0-1618304715921.png

and Disply_name and order are in a dim_table and Tickets are in a fact_table (count of tickets )

lboldrino_1-1618305020225.png

 

The formula below should work for your model.

 

MRS Running Total =
VAR currDisplayValue =
MAX ( 'dim_resolvetime_cluster'[Order] )
VAR result =
CALCULATE (
[MSR Count Tickets],
ALL ( 'dim_resolvetime_cluster' ),
'dim_resolvetime_cluster'[Order] <= currDisplayValue
)
RETURN
IF ( HASONEFILTER ( dim_resolvetime_cluster[Display] ), result, BLANK () )

 

thanx 🙂

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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