Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Date | Supply | Sales | C.Sales | C.Supply |
01-Jan | 25 | 20 | 20 | 25 |
02-Jan | 10 | 4 | 24 | 30 |
03-Jan | 9 | 5 | 29 | 33 |
04-Jan | 10 | 8 | 37 | 39 |
05-Jan | 22 | 7 | 44 | 59 |
06-Jan | 0 | 0 | 44 | 44 |
07-Jan | 15 | 9 | 53 | 59 |
08-Jan | 9 | 9 | 62 | 62 |
09-Jan | 0 | 0 | 62 | 62 |
10-Jan | 12 | 8 | 70 | 74 |
Solved! Go to Solution.
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.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
42 | |
23 | |
21 | |
16 | |
15 |
User | Count |
---|---|
46 | |
31 | |
30 | |
18 | |
18 |