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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Zkna-M
Frequent Visitor

running sum grouped by probablity

I am trying to add a new measure that can calulate cumulative total of value of an item and summarise it on based on probablity.

This is the data that I have

 

ItemValueProbablity
4640.9
4760.8
2420.0
1930.9
1840.8
2850.1
1990.2
1550.1
2911.0
2470.5
2710.7
3800.4

 

So if I summarise by probablity 0.8 and item 1, it should give me the sum of value for all probablity greater than 0.8

 

This is the report that I want to create.

Item 0.10.20.30.40.50.60.70.80.91
1331276177177177177177177930
2294209209209209162162919191
380808080000000
4140140140140140140140140640

 

Can anyone help me out.

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@Zkna-M

 

hi friend

 

First, Create a new Table (Modeling Enter Data)

 

ProbTable.png

 

2. Related Both Table 

 

3. Create a New Measure

 

SumValues =
CALCULATE (
    SUM ( Table1[Value] ),
    FILTER (
        ALLEXCEPT ( Table1; Table1[Item] ),
        Table1[Probablity] >= MAX ( Probabilities[Probability] )
    )
)
    + 0

4. Ready. You can view in a Matrix

 

Matrix.png




Lima - Peru

View solution in original post

4 REPLIES 4
Vvelarde
Community Champion
Community Champion

@Zkna-M

 

hi friend

 

First, Create a new Table (Modeling Enter Data)

 

ProbTable.png

 

2. Related Both Table 

 

3. Create a New Measure

 

SumValues =
CALCULATE (
    SUM ( Table1[Value] ),
    FILTER (
        ALLEXCEPT ( Table1; Table1[Item] ),
        Table1[Probablity] >= MAX ( Probabilities[Probability] )
    )
)
    + 0

4. Ready. You can view in a Matrix

 

Matrix.png




Lima - Peru

I tried but it is not working for me. I must be missing something. 

This is the measure that I have: 

 

SumValue = 
CALCULATE(
	SUM('Item'[Value]),
	FILTER( ALLEXCEPT('Item','Item'[Item]),
		'Item'[Probability] <= MAX(Probablities[Probability])
	)
)
+ 0

 

And this the matrix that I get: 

 

Matrix.JPGWhat am I missing? 

 

 

 

@Zkna-M

 

It should be "greater than" (>=) the custom porbability in filter context:

 

SumValue = 
CALCULATE(
	SUM('Item'[Value]),
	FILTER( ALLEXCEPT('Item','Item'[Item]),
		'Item'[Probability] >= MAX(Probablities[Probability])
	)
)
+ 0

Regards,

 

Sorry. my mistake. I tried changing the sign and doing again but it wasn't working. 

Then I created everything from the scratch again and now it is working. 

 

Thank you so much!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors