Forum Discussion
Santanak
4 years agoRegular Visitor
Roll over
Hi All,
Need help in below calculation as i am new to PBI.
C= B - 15000
D = d[n-1] + c[n]
A B C D
| month | Demand | Demand - 15000 | Carry forward |
| Jan | 27342 | 12342 | 12342 |
| Feb | 7025 | -7975 | 4367 |
| Mar | 30584 | 15584 | 19951 |
| Apr | 22044 | 7044 | 26995 |
| June | 11711 | -3289 | 23706 |
| July | 26103 | 11103 | 34809 |
| Aug | 15266 | 266 | 35075 |
Hi Santanak
I assume that your month column is based on a date column add the following two measures:
v
Demand -15000 = SUM('Table'[Demand]) -15000 Carry forward = SUMX ( CALCULATETABLE ( SUMMARIZE ( 'Table', 'Table'[month], "@Demand-15000", [Demand -15000] ), 'Table'[month] <= MAX ( 'Table'[month] ) ), [@Demand-15000] )
4 Replies
- MFelixSuper User
Hi Santanak
I assume that your month column is based on a date column add the following two measures:
v
Demand -15000 = SUM('Table'[Demand]) -15000 Carry forward = SUMX ( CALCULATETABLE ( SUMMARIZE ( 'Table', 'Table'[month], "@Demand-15000", [Demand -15000] ), 'Table'[month] <= MAX ( 'Table'[month] ) ), [@Demand-15000] )- SantanakRegular Visitor
Thanks Felix for the solution. Just one more criteria, if carried forward is negative in previous row then it will not add.