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
komaragiri
Frequent Visitor

Running Value for each column based on the previous column Value

My data source is EXCEL.  read the excel data source and create a simple Dashboard in BI.

 

Test data attached.  appreciate your help. 

komaragiri_0-1758837848396.png

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

4 REPLIES 4
komaragiri
Frequent Visitor

@lbendlin Instead of DAX for dailyremaing calc, can I create that column during the Transformation step? 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("TZA7DkMhDATvQo308A9MnxOkRRSvyA1yf8WQ2KHZYpZFA2Okx/1+pZyesALTzCPphf3CgmIImC0r78Koc23Nslt+C4pB6Zblh9kxIxxYHGMrB1bHBHrgkCE5T0MJmfNuAMdCe+PuEPKEdZlmIfXub0Swuwqxq7FTXF0T/414NWasa0cZTGbODw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t]),
    #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Date", type date}, {"R1", Int64.Type}, {"R2", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", (k)=> let t = Table.SelectRows(#"Changed Type",each [Date]<=k[Date])
in 
13749 - List.Sum(t[R1]) - List.Sum(t[R2])
,Int64.Type)
in
    #"Added Custom"

How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the entire Source step with your own source.

 

lbendlin_0-1759006536502.png

 

komaragiri
Frequent Visitor

@lbendlin  Thank you for ur help.  

lbendlin
Super User
Super User

lbendlin_0-1758844395664.png

 

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!

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.