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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
mluanacruz
Helper I
Helper I

Average from the past 3 months

Hello! 
I have a loss triangle where I am trying to find the ratio of the months. 

mluanacruz_0-1664246338344.png

PLEASE SEE LINK HERE FOR THE EXCEL VERSION AND POWER BI 

I want my results to be column1/columns 0  = 8065/5108  column 2/column1 = 8520/8065 and so on.

I tried few different methods I found online but none of them worked. Does anyone has any idea how to do this?

 

Thanks for the help.

 

Michelle

1 ACCEPTED SOLUTION
mluanacruz
Helper I
Helper I

I anyone is having the same question, here is what worked for me.

Ratio_Measure =

VAR DEV_MNT = MAX('PD_agg_perf_measures'[DEV_MONTHS])

VAR NuM = CALCULATE(SUM('PD_agg_perf_measures'[CNP_CNT_ACCOUNTING_VIEW]),FILTER(ALLSELECTED('PD_agg_perf_measures'),[DEV_MONTHS]= DEV_MNT&&[ACCIDENT_DATE_YYYYMM]=MAX('PD_agg_perf_measures'[ACCIDENT_DATE_YYYYMM])))

VAR DEN = CALCULATE(SUM('PD_agg_perf_measures'[CNP_CNT_ACCOUNTING_VIEW]),FILTER(ALLSELECTED('PD_agg_perf_measures'),[DEV_MONTHS]=DEV_MNT-1 &&[ACCIDENT_DATE_YYYYMM]=MAX('PD_agg_perf_measures'[ACCIDENT_DATE_YYYYMM])))

RETURN DIVIDE(NuM, DEN,0)
 
 
Hope it helps!!

View solution in original post

3 REPLIES 3
mluanacruz
Helper I
Helper I

I anyone is having the same question, here is what worked for me.

Ratio_Measure =

VAR DEV_MNT = MAX('PD_agg_perf_measures'[DEV_MONTHS])

VAR NuM = CALCULATE(SUM('PD_agg_perf_measures'[CNP_CNT_ACCOUNTING_VIEW]),FILTER(ALLSELECTED('PD_agg_perf_measures'),[DEV_MONTHS]= DEV_MNT&&[ACCIDENT_DATE_YYYYMM]=MAX('PD_agg_perf_measures'[ACCIDENT_DATE_YYYYMM])))

VAR DEN = CALCULATE(SUM('PD_agg_perf_measures'[CNP_CNT_ACCOUNTING_VIEW]),FILTER(ALLSELECTED('PD_agg_perf_measures'),[DEV_MONTHS]=DEV_MNT-1 &&[ACCIDENT_DATE_YYYYMM]=MAX('PD_agg_perf_measures'[ACCIDENT_DATE_YYYYMM])))

RETURN DIVIDE(NuM, DEN,0)
 
 
Hope it helps!!
HoangHugo
Solution Specialist
Solution Specialist

Hi

Call name of Column is Index column (should be whole number type)

please try this

Measure

Percentage = your measure/CALCULATE(your measure, Index column -1)

Hi @HoangHugo 

Thanks for the answer! But I don't have any measure yet. This is strait from my excel workbook.
 I tried few different measures but none of them worked. Can you please help with the right measure?




 

I appreciate it!

 

Thank you!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.