Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Everyone, i want to create a Dax Measure for Average Severity Score for each category by grouping risk type.
My Fact_Claim_Service_Provider looks like this,
Service_Center_ID | Risk_Type_ID | Severity Score | Severity Benchmark | Claim Count |
3284 | 1143 | 112 | 369 | 5 |
3284 | 1143 | 115 | 369 | 4 |
3284 | 1143 | 105 | 369 | 10 |
3284 | 1187 | 91 | 327 | 20 |
3284 | 1115 | 84 | 327 | 15 |
3285 | 1143 | 112 | 369 | 5 |
3285 | 1143 | 115 | 369 | 4 |
3285 | 1143 | 105 | 369 | 10 |
3285 | 1187 | 91 | 327 | 20 |
3285 | 1115 | 84 | 327 | 15 |
3287 | 1143 | 112 | 369 | 5 |
3287 | 1143 | 115 | 369 | 4 |
3287 | 1143 | 105 | 369 | 10 |
3287 | 1187 | 91 | 327 | 20 |
3287 | 1115 | 84 | 327 | 15 |
I need to group Risk_Type_ID and arrive average severity score for each service center.
Ex : for Service_Center_ID 3284, formula Average Severity Score =((112+115+105)*19/54)+(91*20/54)+(84*15/54)
The output 173.84. Same need to be done for all service center.
Can anyone help me on the dax measure.
Solved! Go to Solution.
Hi, @Asfaa5
Please try the below measure.
Avg Severity Score =
VAR currentcenterid =
MAX ( 'Table'[Service_Center_ID] )
VAR newtable =
SUMMARIZE (
FILTER ( ALL ( 'Table' ), 'Table'[Service_Center_ID] = currentcenterid ),
'Table'[Risk_Type_ID],
"@securityscore", SUM ( 'Table'[Severity Score] ),
"@claimcount", SUM ( 'Table'[Claim Count] ),
"@claimcountall",
CALCULATE (
SUM ( 'Table'[Claim Count] ),
ALLEXCEPT ( 'Table', 'Table'[Service_Center_ID] )
)
)
RETURN
SUMX ( newtable, DIVIDE ( [@securityscore] * [@claimcount], [@claimcountall] ) )
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @Asfaa5
Please try the below measure.
Avg Severity Score =
VAR currentcenterid =
MAX ( 'Table'[Service_Center_ID] )
VAR newtable =
SUMMARIZE (
FILTER ( ALL ( 'Table' ), 'Table'[Service_Center_ID] = currentcenterid ),
'Table'[Risk_Type_ID],
"@securityscore", SUM ( 'Table'[Severity Score] ),
"@claimcount", SUM ( 'Table'[Claim Count] ),
"@claimcountall",
CALCULATE (
SUM ( 'Table'[Claim Count] ),
ALLEXCEPT ( 'Table', 'Table'[Service_Center_ID] )
)
)
RETURN
SUMX ( newtable, DIVIDE ( [@securityscore] * [@claimcount], [@claimcountall] ) )
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |