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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
rkkumar79
Regular Visitor

DAX formula for Cumulative Supply

Hi,

I am new to powerbi.need help on below.
Need a DAX formula for Cumulative supply as mentioned below.

 

Cumulative supply formula to be
1st Jan = Supply
2nd Jan = Cumm Sales till previous day+2nd Supply
3rd Jan = Cumm Sales till previous day+3rd Supply
4th Jan = Cumm Sales till previous day+4th Supply
and so on.

 

DateSupplySalesC.SalesC.Supply
01-Jan25202025
02-Jan1042430
03-Jan952933
04-Jan1083739
05-Jan2274459
06-Jan004444
07-Jan1595359
08-Jan996262
09-Jan006262
10-Jan1287074
1 ACCEPTED SOLUTION
memepu
Resolver II
Resolver II

Hi @rkkumar79 ,

Please have a try.

Create a measure.

Measure =
CALCULATE (
    SUM ( 'Table'[Sales] ),
    FILTER ( ALL ( 'Table' ), 'Table'[Date] <= SELECTEDVALUE ( 'Table'[Date] ) )
)

 

Or a column.

column = 
CALCULATE (
    SUM ( 'Table'[Sales] ),
    FILTER ( ( 'Table' ), 'Table'[Date] <= EARLIER( ( 'Table'[Date] ) )
)
)

 

If I have misunderstood your meaning, please provide more details with your desired output.

 

Best regards.

View solution in original post

2 REPLIES 2
memepu
Resolver II
Resolver II

Hi @rkkumar79 ,

Please have a try.

Create a measure.

Measure =
CALCULATE (
    SUM ( 'Table'[Sales] ),
    FILTER ( ALL ( 'Table' ), 'Table'[Date] <= SELECTEDVALUE ( 'Table'[Date] ) )
)

 

Or a column.

column = 
CALCULATE (
    SUM ( 'Table'[Sales] ),
    FILTER ( ( 'Table' ), 'Table'[Date] <= EARLIER( ( 'Table'[Date] ) )
)
)

 

If I have misunderstood your meaning, please provide more details with your desired output.

 

Best regards.

daXtreme
Solution Sage
Solution Sage

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.