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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

How to calculate a loss ratio relativity? Divide ratio for a specific year by the overall ratio

powerbi_question.PNG

In PowerBI, I was able to just create the Loss Ratio measure for my matrix visual as it was just doing division of Ult Loss/Ult Premium with the simple quick measure function:

Ult Loss Ratio =
DIVIDE(SUM('Version4'[Ult Losses]), SUM('Version4'[Ult EP]))
 
This is analagous to creating a calculated field in Excel after generating the pivot table.

However, when calculating a relativity, which in this case is dividing a loss ratio for a specific year by the overall loss ratio. I wasn't sure how to do this in PowerBI:

powerbi_question2.PNG

In Excel you kinda have to brute force it with the cell locking and stuff. In PowerBI I wasn't sure how to go about it. 'Year' is not the only variable I'm slicing my data by (and creating matrix visuals for) so the measure would have to be flexible where you can just drag and drop regardless.

Can anyone help me out here? Thanks!

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@Anonymous 

Give this measure a try, see if it give you what you are lookin for.

Reltativity =
VAR _Overall = CALCULATE ( [Ult Loss Ratio], ALL ( 'Version4' ) )
RETURN
DIVIDE ( [Ult Loss Ratio], _Overall )

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

@Anonymous 

Give this measure a try, see if it give you what you are lookin for.

Reltativity =
VAR _Overall = CALCULATE ( [Ult Loss Ratio], ALL ( 'Version4' ) )
RETURN
DIVIDE ( [Ult Loss Ratio], _Overall )

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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