Forum Discussion

pianotoad's avatar
pianotoad
Regular Visitor
4 years ago
Solved

Divide two measures - wrong calculation

Hi Community,

 

Working on my Power BI I have created two measures. One calculates all closed opportunities this year of selected user, the other calculates all won opportunities of that user this year. This part works, both measures are whole numbers, e.g. 16 and 37.

Now I want to divide the two to calculate a hit rate: How many of all closed (as won and as lost) opportunities has this particular salespeson won.

Simple math:

HitRate = DIVIDE(Opportunities[WonOpps],Opportunities[ClosedOpps])
 
In the above example it should simply divide 16 by 37, give 0.43 and everyone is happy. 
Instead, it gives me 0.56. The calculations are always wrong. 
If I simply say
HitRate = DIVIDE(1,2)
it correctly gives me 0.5.
 
I have made sure the measures are integers.
 
Any ideas?
 
Thanks,
pianotoad
  • Ok, my apologies. I thought after I have tried everything (I thought) I ask the community.

    Now I saw there was simply another filter on my report affecting the result of the calculation, while the two measures (which I also show) are specificially not affected by that filter.

    Made sure the result is also not affected by the filter and voilà, now it works correct!

1 Reply

  • pianotoad's avatar
    pianotoad
    Regular Visitor

    Ok, my apologies. I thought after I have tried everything (I thought) I ask the community.

    Now I saw there was simply another filter on my report affecting the result of the calculation, while the two measures (which I also show) are specificially not affected by that filter.

    Made sure the result is also not affected by the filter and voilà, now it works correct!