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 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 |
Solved! Go to Solution.
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]
)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @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]
)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks Felix for the solution. Just one more criteria, if carried forward is negative in previous row then it will not add.
Hi @Santanak,
You want that if for example you have
Demand -15000 | Carried Forward | Carried forward Expected |
1000 | 1000 | 1000 |
-1500 | -500 | 1000 |
500 | 0 | 1500 |
Is this what you mean?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Portuguêsif CF is -ve, then in next row 0 will be added .
month | Demand | Demand - 15000 | Carry forward |
Jan | 27342 | 12342 | 12342 |
Feb | 7025 | -7975 | 4367 |
Mar | 30584 | 15584 | 19951 |
Apr | 2204 | -12796 | 7155 |
June | 1171 | -13829 | -6674 |
July | 2610 | -12390 | 0 |
Aug | 15266 | 266 | 266 |
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 |
---|---|
106 | |
97 | |
75 | |
63 | |
62 |
User | Count |
---|---|
135 | |
105 | |
104 | |
80 | |
65 |