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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
carH
Helper I
Helper I

Simple Running Total

New to PBI.

 

I have 3 columns in a table visual, SKU #, Description and a Sum of forecasted inventory dollars. The column for forecasted inventory dollars is a calculated column (forecasted inventory dollars = x - y ).  I want to calculate a running total of the inventory dollars. I tried, Quick Meaures, Running totals on this column, however the result is the same as the inventory dollars column?  I've read through many post, and tried a few different methods, but can't quite find my answer.  Thanks for your time. 

 

 

2 REPLIES 2
v-xicai
Community Support
Community Support

Hi @carH ,

 

You may create measure like DAX below.

 

running total measure = CALCULATE(SUM(Table1[forecasted inventory dollars]),FILTER(ALLSELECTED(DateDim),DateDim[Date] <= MAX(DateDim[Date])))

If I misunderstood it, could you please share your sample data and desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Best Regards,

Amy

 

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

Hi Amy - thanks for your reponse. I do not have date columns in my model (see red below from your example measure)

 

running total measure = CALCULATE(SUM(Table1[forecasted inventory dollars]),FILTER(ALLSELECTED(DateDim),DateDim[Date] <= MAX(DateDim[Date])))

This is an example of my table (SKU, Description, Price, ForcsastedInvDollars). I'm trying to add the running total column (seen below on the end in red).  As you can see there are no dates associated with this data set. This is a snapshot of a predetermined time in the future which is calculated outside this model. Please note, the full data set contains zero's, postive numbers and negative numbers within the coloumn forecasted inventory dollars. Thank so much for your help!

 

SKU DescriptionPrice ForcastedInvDollarsRunning Total 
12345Example SKU Description 1$3.45$328$328
23571Example SKU Description 2$12.99$310$638
10101Example SKU Description 3$8.10$310$948
65651R2Example SKU Description 4$1.05$277$1,225
X4555Example SKU Description 5$2.99$0$1,225
12345Example SKU Description 6$23.50($40)$1,185
67891Example SKU Description 7$6.32($46)$1,139
78912BExample SKU Description 8$35.46($75)$1,064

 

 

I've tried Quick Measure's, Running total. here is the DAX created by using that option. 

Net SurplusShortage running total in itemNbr =
CALCULATE(
    SUM('stockposition_final'[Net SurplusShortage]),
    FILTER(
        ALLSELECTED('PBI ItemMasterAll'[itemNbr]),
        ISONORAFTER('PBI ItemMasterAll'[itemNbr], MAX('PBI ItemMasterAll'[itemNbr]), DESC)
    )
)

This is not working, the result is the same value from the forecastedInvDollars Column. Here's an example:

 

SKUDescriptionpriceforcastedInvDollarsRunning Total 
12345Example SKU Description 1$3.45$328$328
23571Example SKU Description 2$12.99$310$310
10101Example SKU Description 3$8.10$310$310

 

Thanks!

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors