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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
artlearning
Regular Visitor

Create a running total based on another measure

Hello everyone - I need a measure that provide a running total (RT) based on the result of another measure (Shipped). Below my data set and the current output (measures below)

 

DatePaid QtyShippedRT
11/1/2021200
12/1/2021204
1/1/2022200
2/1/2022200
3/1/2022121216
4/1/202212028
5/1/2022141442
6/1/202214056
7/1/202214070
8/1/2022171787
9/1/2022170104
10/1/2022170121
11/1/2022170138
12/1/2022170155

 

Where

 

 

 

 

[Paid Qty]

CALCULATE (
    SUM ([Qty] ),
    Data[Transaction] = "Paid"
)



Where [Paid PM]

CALCULATE (

SUM ( [Qty]),

DATEADD ( Data[Fiscal Date], -1, MONTH )

)



[Shipped]

IF (

[FM ID] = 0, --First month is excluded, this Measure is MAX(FiscalDateID)

0,

IF ( AND ( [Paid Qty] > [Paid Qty PM], [Paid Lics] > 0 ), [Paid Qty], 0 )

)

[RT]

CALCULATE (

[Shipped],

DATESYTD('Data'[Fiscal Date])

)

 

 

 

 

The output I'm looking for is 

 

DatePaid QtyShippedRT
11/1/2021200
12/1/2021200
1/1/2022200
2/1/2022200
3/1/2022121212
4/1/202212012
5/1/2022141414
6/1/202214014
7/1/202214014
8/1/2022171717
9/1/202217017
10/1/202217017
11/1/202217017
12/1/202217017

 

I can't figure this one out, so I'd really appreciate some help!

1 REPLY 1
Anonymous
Not applicable

Hi @artlearning,

I'm not so clear how the qty expression calculated. Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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