We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
needHello, wondering if anyone could help calculate the following logic for me in dax (not a coder)
thanks much in advance
IF C_O>=0, then
calculate -(U_P)-(B_Y)+(L_W)
ELSE
CALCULATE -(U_P)+(B_Y)+(L_W)
| C_O | U_P | B_Y | L_W | expected value |
| -4.30 | 0.098 | 0.705 | 0.197 | -0.607 |
| -1.80 | 0.426 | 0.265 | 0.309 | -0.382 |
| -7.50 | 0.304 | 0.670 | 0.027 | -0.946 |
| -9.10 | 0.294 | 0.669 | 0.037 | -0.926 |
| 10.00 | 0.038 | 0.641 | 0.321 | 0.923 |
| 7.10 | 0.135 | 0.740 | 0.125 | 0.729 |
| 1.50 | 0.433 | 0.167 | 0.400 | 0.133 |
Solved! Go to Solution.
Your psuedo-code is pretty close actually:
expected value column =
IF(
[C_O] >= 0,
-1*[U_P] - [B_Y] + [L_W],
-1*[U_P] + [B_Y] + [L_W]
)
Your psuedo-code is pretty close actually:
expected value column =
IF(
[C_O] >= 0,
-1*[U_P] - [B_Y] + [L_W],
-1*[U_P] + [B_Y] + [L_W]
)
many thanks.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 6 | |
| 4 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 7 | |
| 7 | |
| 6 |