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.
Hello all,
I am struggling in Power Bi to compute the following formula (remain to engage)
RTE(m) = MAX [ sum[TSP] (m0 to m) - sum[AEFP] (m0 to m) -sum[RTE] (m0 to m-1) ; 0]
see example below
would you have any idea to solve this please ?
thank you for your support
regards
gen
Month | Total Spend planned (TSP) | Already engaged for payment (AEFP) | Remain to engage (RTE) |
1 | 200 | 180 | 20 |
2 | 100 | 80 | 20 |
3 | 150 | 30 | 120 |
4 | 100 | 10 | 90 |
5 | 200 | 5 | 195 |
6 | 50 | 50 | |
total | 800 | 305 | 495 |
From your example, it looks like you can simply define RTE = TSP - AEFP (or maybe MAX( TSP - AEFP, 0 ) ).
Recursion in DAX is problematic in general but often you can find non-recursive ways of doing the computation. Check out this post for more detail: https://stackoverflow.com/questions/52766022/recursion-in-dax
actually my example was a little bit easy... it happens that the planned revised is below the already engaged..
in this case I need the max to avoid further engagement and make sure that month after month my cumul is valid
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 |
---|---|
49 | |
26 | |
21 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |