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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
mdhenzel
Frequent Visitor

Running Total Measure that goes by row and column in Matrix if possible..

Hi All, This is something that is probably not possible, but I would like to ask first before giving up. I am building a running inventory visual for an area of a report. I used a measure that has worked before for me, but that was for looking at a material overall across time. Now, doing it by customer and material throws it off. Is it possible to have this measure work top to bottom or something? Example: June 29th top value of 19 (not -1), then the lower would still take the 3 off for the total of 16. I have it down to the day to solve issue, but data will be looked at as month to month.  

 

mdhenzel_1-1656514342156.png

 

 

 

 

3 REPLIES 3
amitchandak
Super User
Super User

@mdhenzel , Not very clear. But you use a date table and use that in visual too

 

then this will only give cumulative across date for material/customer combination

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all('Date'),'Date'[date] <=max('Date'[date])))

 

 

or allselected

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected('Date'),'Date'[date] <=max('Date'[date])))

if use the table(sales in above example) in place of the date table, then you need to add additional conditions

 

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

Hi there, I currently am using the following measure:

 
Inv. Running =
Var First = [Unrestricted to Use]

VAR LastVisibleDate =
MAX ( 'Date Table'[Date] )
VAR FirstVisibleDate =
MIN ( 'Date Table'[Date] )
VAR LastDateWithSales =
CALCULATE (
MAX ( 'Ready To Ship'[Customer Requirement Date] ),
REMOVEFILTERS ()
)
VAR Result =
First +
IF (
FirstVisibleDate <= LastDateWithSales,
CALCULATE (
[Orders to Ship] ,
'Date Table'[Date] <= LastVisibleDate
)
)
RETURN
Result
 
This is only getting me the correct values at the total level for the columns. Not through the values, as shown in my images. 
I do have a date table and it is being used as the columns in the matrix. 

 

mdhenzel
Frequent Visitor

To Add, for July, it would be 16 - 15 for 11, - 25 for -14 and so on. If not possible, do we know why the measure is working in this way?

 

mdhenzel_0-1656515415632.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors