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
Amedved
Frequent Visitor

Creating a Rolling, Cumulative Metric in a Matrix Visual

Hi! I am trying to create a measure to add to my matrix visual that is a rolling total. This "Backlog" measure should subtract the current day's "Output" from the prior day's backlog plus the current day's "RemainingQtyTotal". The measure works for some days, but not for most of them. In the below screenshots, for 4/25 the backlog should be (404.7+18)-10.5=412.2. And other days don't subtract the Output at all, like 5/21. Here is a link to my Pbix file. Below are my current formula plus screenshots for reference. Appreciate any help!

 

 

 

Backlog = 
VAR CurrentDate = MAXX(ALLSELECTED(Orders),Orders[PlanDate])
RETURN (IF (MAX('Date'[Date]) <= CurrentDate,
CALCULATE(
    [RemainingQtyTotal],
    FILTER(
       ALLSELECTED('Date'[Date]),
        ISONORAFTER('Date'[Date],MAX('Date'[Date]),DESC)
    )
),blank()
))
-[Output]

 

 

 

Amedved_0-1714053231460.png

Amedved_1-1714053301999.png

Amedved_3-1714053382465.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Amedved ,

I updated your sample pbix file, please find the details in the attachment.  You can create a new calculation to get it:

Calculation = PREVIOUS([Backlog])+[RemainingQtyTotal]-[Output]

vyiruanmsft_0-1714117294225.png

vyiruanmsft_1-1714117496837.png

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Amedved ,

I updated your sample pbix file, please find the details in the attachment.  You can create a new calculation to get it:

Calculation = PREVIOUS([Backlog])+[RemainingQtyTotal]-[Output]

vyiruanmsft_0-1714117294225.png

vyiruanmsft_1-1714117496837.png

Best Regards

Thanks very much @Anonymous . I was not familiar with visual calculations. I took your suggested approach and got to the desired outcome after I adjusted the formula a bit to meet some requirements. Thanks again for the assist.

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.