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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
phs_1985
New Member

Running total based on conditions

Hi,

I need help with getting result in Power BI replicating yellow highlighted column in image shared below:

phs_1985_0-1678679282645.png


The calculation requires to get running total of all “distribution types” except “Investment” & “Payment” but in all dates with rows showing “Payment” it should keep showing “Investment” till any other type is found and then it should consider that in the calculation and reset to that value.

I have made some progress but unable to add the value after other type row is there and reset rest rows to that value. Cuurent output in power bi:

phs_1985_1-1678679341204.png

Sample of distribution table:

phs_1985_2-1678679453938.png

So I need the DAX to iterate through every row of this table and cumulate only if its any other type other than Investment or Payment, otherwise keep returning Investment value. 


Any help is appreciated!


Thank You,
Prutha


0 REPLIES 0

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.