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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.