Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
hello,
i have a problem with my dax formula.
In my matrix, I have a column with negative and positive values (actual numbers) and a column with target values (sums). My dax formula calculates the negative values (-values) correctly, but it always adds the positive values, because minus and minus gives plus, the formulas had to be like this for the negative values.
For the positive values, however, I can't manage to convert the formula correctly so that it subtracts the actual target values: Solution_time_plus_target =
IF(
SUMX(‘complete report FMIT Helpdesk’, ‘complete report FMIT Helpdesk’[FM solution time TARGET]) >= 0,
SUM(‘complete report FMIT Helpdesk’[resolution time final]) + SUMX(‘complete report FMIT Helpdesk’, ‘complete report FMIT Helpdesk’[FM resolution time TARGET]),
SUM(‘complete report FMIT Helpdesk’[FM resolution time TARGET]) -
SUMX(
‘complete report FMIT Helpdesk’,
IF(
‘complete report FMIT Helpdesk’[resolution time final] < 0,
‘complete report FMIT Helpdesk’[resolution time final],
0
)
)
)
Maybe one of you knows the correct answert. Thank you for helping. Natascha
C = my mistake, sorry!
Already the same problem. the result of the positive values is correct, the negative values are still added in my file
@Natascha_D , Try using below measure
Solution_time_plus_target =
SUMX(
'complete report FMIT Helpdesk',
IF(
'complete report FMIT Helpdesk'[FM solution time TARGET] >= 0,
'complete report FMIT Helpdesk'[resolution time final] - 'complete report FMIT Helpdesk'[FM solution time TARGET],
'complete report FMIT Helpdesk'[resolution time final] + 'complete report FMIT Helpdesk'[FM solution time TARGET]
)
)
Proud to be a Super User! |
|
Thank you very much for your answer. I tried but the positive values get allready wrong. The system make the addition not the subtraktion....
@Natascha_D , Can you share sample data
Proud to be a Super User! |
|
@Natascha_D , Please find the attached PBI file and sample data is working on below logic can you check if it is correct or not
resolution time final FM solution time TARGET Expected Result
10 5 5
-8 3 -11
15 7 8
-12 -4 -16
20 10 10
-5 -2 -7
Proud to be a Super User! |
|
Thank you very much.
The result is not correct. I am trying to make it clearer.
Sum of fm solution time target is always a positive value, which must be subtracted with positive or negative values
e.g. Assigen A = correct
assigne B = incorrect, should be - 5
assigne C = incorrect, should be -8
does this make it clearer? can you help me?
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
30 | |
16 | |
14 | |
14 | |
9 |