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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Rolling Count Formula

Hi all ,

 

I have this Rolling count formula for the previous 6 months. But the numbers dont match and I dont know why.

 

Sol Provided Cases 6MM =
VAR pre6 =
    CALCULATE(EOMONTH( MAX ( 'All_BGs-Cases_1'[Solution Provided Date]), -6 ))
VAR cure =
    CALCULATE(EOMONTH( MAX ( 'All_BGs-Cases_1'[Solution Provided Date]), 0 ))
   
RETURN
   CALCULATE (
      Count('All_BGs-Cases_1'[Support Ticket Number]),
        FILTER (
           ALLEXCEPT ( 'All_BGs-Cases_1','All_BGs-Cases_1'[cbt],'All_BGs-Cases_1'[Severity],'All_BGs-Cases_1'[legalaccountname],'All_BGs-Cases_1'[Service Type],Product_Group_Lookup[Product Name]),
          'All_BGs-Cases_1'[Solution Provided Date] > pre6
                && 'All_BGs-Cases_1'[Solution Provided Date] <= cure
        ),'All_BGs-Cases_1'[Case Milestone_Final_Sol_Violated]<>blank(),'All_BGs-Cases_1'[final_sol_target_date]<>Blank())
 
But as you can see there are some months that the sum/count is not done correctly .
Bassa_0-1708427402776.png

 

Can anyone help ?



1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , I usually prefer to join the key date with date table and use columns from date table in visual, measure and slicer and formula like

 

Rolling 6 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-6,MONTH))

 

Rolling 6 = CALCULATE([Net], WINDOW(-5,REL, 0, REL, ADDCOLUMNS(ALLSELECTED('Date'[Month Year],'Date'[Month Year Sort] ),ORDERBY([Month Year Sort],asc)))

 

Rolling Months Formula: https://youtu.be/GS5O4G81fww

 

Continue to explore Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
https://medium.com/@amitchandak/power-bi-window-function-3d98a5b0e07f

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.