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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Wagwo0rd4powerb
Regular Visitor

Calculating 3 Month rolling total not working when value is blank

Example of my code:

 

Wagwo0rd4powerb_0-1723469970553.png

Oct2023 is blank and therefore no value displays. Please advise.

4 REPLIES 4
Wagwo0rd4powerb
Regular Visitor

still not working ☹️

Anonymous
Not applicable

Hi @Wagwo0rd4powerb ,

 

Try replacing blank with 0. via power query if the connection mode supports it.

 

Best regards,
Community Support Team_ Scott Chang

Wagwo0rd4powerb
Regular Visitor

This also does not work... 

 

3 Months CaseCounQTY Rolling Total = CALCULATE(SUM(MDSProduction[Amount Case Count])+0,
DATESINPERIOD(MDSProduction[Month Year Date],LASTDATE(MDSProduction[Month Year Date]),-3,MONTH)) 

 

Wagwo0rd4powerb_0-1723471701227.png

 

 

Anonymous
Not applicable

Hi @Wagwo0rd4powerb ,

 

Try using the following expression:

 

3MonthRollingTotal = 
CALCULATE(
    SUMX(
        Table,
        IF(ISBLANK(Table[Value]), 0, Table[Value])
    ),
    DATESINPERIOD(
        Table[Date],
        LASTDATE(Table[Date]),
        -3,
        MONTH
    )
)

 

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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