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.
I have created 2 measures that are working wonderfully.
Solved! Go to Solution.
I think I have found the problem. At some point through the calculations, the signage of one of the figures is being swapped. In the final measure both input values are shown as a negative (hence the incorrect value is being calculated vs the expected value), however pre input one of these values should be a positive.
I will now step through the calculations to pin point exactly what is going on here.
Many Thanks to you all for confirming that the DAX should work which ruled this out for me as a variable.
Hello Experts, i am calculating the difference between two columns based on row values. But the difference is slightly off. Column 1 is Sales actual and column 2 is Plan cost
Sales Actual-Plan = [Sales Actual] - ['Year Plan'[Plan Cost]
Sales Actual Plan Cost Sales Actual - Plan Cost
1,335,121 3,947,194 -2,611,985 wrong supposed to be -2,612,073
1,692,710 6,557,214 -4,864,504. correct
1,188,426 3,154,451 -1,966,013 wrong supposed to be -1,966,025
.
.
.
Total
33,144,323 116,599,970 -83,205,650 wrong supposed to -83,455,647
Not sure what is going on here. Please any help will be greatly appreciated
What is it that you are showing in the capture? A matrix visual?
Can you share the pbix file?
I know it isn't helpful but I can not share the PBX in this instance because of the data.
Yes - It's an adulterated matrix view to show whats going on.
I have validated both measures feeding this final subtration measure and to that point everything is correct.
Both figures feeding in are correct, however the result is not.
What's the code for the other two measures? With this amount of info you leave us a bit in the dark.
Maybe you can share a mock pbix with just dummy data but showing the issue? I guess if this is not very time-consuming
HI, @GarethWoodhouse
I have tested on my side, all these three measure work well. there should be some other problem caused the wrong answer.
Could you please use some simple simulated data to do a pbix file and share it with the expected output.
Best Regards,
Lin
I think I have found the problem. At some point through the calculations, the signage of one of the figures is being swapped. In the final measure both input values are shown as a negative (hence the incorrect value is being calculated vs the expected value), however pre input one of these values should be a positive.
I will now step through the calculations to pin point exactly what is going on here.
Many Thanks to you all for confirming that the DAX should work which ruled this out for me as a variable.
What answer are you hoping for? Looks like from here that if you subtract those two figures, you get the total. Generally the issues with totals is one of filters, or lackthereof.
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 |
---|---|
113 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |