Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |