Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am having measures on both numerator and denominator. Using a division operation on them yields wrong result using both "/" operator or "DIVIDE" DAX expression. It seems that there is some issue with division or numeric model in Power BI.
Ex.: TempMeasure = ((Measure1 * 7) / Measure2),
Where Measure1 = 45,
Measure2 = 13.
So, the expected outcome is 24.23. However, Power Bi reports it as 24.83 no matter what division operator or DAX function I use. I tried using quick measure as well but the result is still the same. Seems like an issue to me. This is resulting in wrong reporting since rounding this number will yield different values.
Any ideas?
Solved! Go to Solution.
I think I found the fix. Once I changed the measure with ROUND() function, the measure data type was correctly recognized by PBI and hence the division was performed accurately. But strangely, the same measure was not recognized correctly without ROUND function. Though, the value returned was correct. Seems like data structures in PBI more strongly typed. Anyways, thanks to all for their comments.
@Anonymous , I divide in power bi and check. It is coming correct. Can you increase the decimal place of the measures and check if there is somthing after the decimal place.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.
Increasing the decimal places also does not help as it will add another digit after "24.83". It is something weird happening if you are able to get correct results and I am not. The only thing is that I have measures which are again calculated using column values and other measures and which are coming right. It's just that division is not coming correct. The resulting measure I have made as decimal number with 2 digits. If I make it as whole number than rounding comes as "25" while the correct result is "24". Quite weird...
To filter the data, I need to make a separate model since it contains lots of data with many tables. I will send pbix file once I do that. Meanwhile, any ideas if you get, please help.
Hi @Anonymous ,
Be aware that DAX measure are based on row context so any given value from slicers, filters, interactions with other visualizations, variables, relationships and so on can influence your result.
I think that's the cause of the problem. If you can't share the sample pbix, you can check it according to this principle.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is fine. Measures depends upon rows. But my question is still valid as the values I am getting from row context for both numerator and denominators are correct. The only issue is with division i.e.: (45 * 7)/13 = 24.23 (EXPECTED) while in the measure, it reports as (45 * 7)/13 = 24.83 (ACTUAL).
Values on the left are same but result on the right are not. That's frustrating. I will cut short my PBIX and then attach it here for further reference then may be someone can tell me what's the exact problem with calculation.
I think I found the fix. Once I changed the measure with ROUND() function, the measure data type was correctly recognized by PBI and hence the division was performed accurately. But strangely, the same measure was not recognized correctly without ROUND function. Though, the value returned was correct. Seems like data structures in PBI more strongly typed. Anyways, thanks to all for their comments.
User | Count |
---|---|
98 | |
91 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |