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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jacob1832
Frequent Visitor

Rolling 4 week average conversion rate

I am trying to create a rolling 4 week average conversion rate. The column LTA is the conversion rate and equals (Appts/Leads). RIght now, LTA is week by week. I need to create a new column that is a 4 rolling conversion rate. 
Here is the data.

Jacob1832_2-1654556785858.png

 

So if we started at the bottom, the RollingAvg for May 29 would be (19+19+32+38)/(25+45+60+82) = 50.943 %

For the week may 22, the numbers would roll back one week, so itd be (19+32+38+0)/(45+60+82+117) = 29.276 %

Help would be appricated.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Jacob1832 , Try a new column like

 

new column =
var _date = [Week]
return
divide(sumx(filter(Table, [Week] > _date -28 && [Week]<= _date ),[Appts]),sumx(filter(Table, [Week] > _date -28 && [Week]<= _date ),[leads]))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Jacob1832 , Try a new column like

 

new column =
var _date = [Week]
return
divide(sumx(filter(Table, [Week] > _date -28 && [Week]<= _date ),[Appts]),sumx(filter(Table, [Week] > _date -28 && [Week]<= _date ),[leads]))

How would i adjust the calculation if i had a single number (Actuals) and a grouping variable (state)?
The rolling average would still have the same numerator, the denominator would now be 4 since its a 4 week rolling average and not a conversion rate. How would I incorporate the group of state?

Jacob1832_0-1654637321490.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors