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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors