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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
powermbz
Frequent Visitor

Rolling 12 months calculation for each month

Hi folks,

 

I have a complex calculation to calculate rolling 12 months loss ratio for each month. I have to replicate the below formula to get Rolling 12 month loss rate for each month, what is the best way to achieve this in DAX?

 

Loss % = 1 - { (1 - (Inflow month 1/Outflow month 1)) * (1 - (Inflow month 2/Outflow month 2)) * (1 - (Inflow month 3/Outflow month 3))  ...... (1 - (Inflow month 12/Outflow month 12))  }

 

MonthInflowOutflowCalculated Value  (1 - (Inflow month /Outflow month )Desired Output
Dec-2350004000.92 
Jan-2452008000.846153846 
Feb-245250800.984761905 
Mar-2454001200.977777778 
Apr-2454501250.97706422 
May-2455001000.981818182 
Jun-245600400.992857143 
Jul-245650500.991150442 
Aug-2457001500.973684211 
Sep-2457502000.965217391 
Oct-2458002500.956896552 
Nov-2458502300.96068376139%

 

Any help on his would be much appreciated

1 REPLY 1
Greg_Deckler
Super User
Super User

@powermbz Better Rolling Average - Microsoft Fabric Community


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Top Kudoed Authors