cancel
Showing results for
Did you mean:
olv Frequent Visitor

## Divide Function is not giving me the correct result

Hello everyone,

So I have this problem with the DIVIDE function. What I want to do is Divide the column of Count of Claims by the Vehichle Year based on the first column. The Incurred Loss Frequency is a calculated column that I am creating. So if i were to do the math 65/411.70 = 0.15788. Instead it gives me 20.31 and I have no clue where it got that number from. I am new to PowerBI so any help would be appreciated. Thank youu!

1 ACCEPTED SOLUTION

Accepted Solutions
olv Frequent Visitor

## need help with Divide function

Hello all

I am new to PowerBI and I am having trouble w the Divide Function. Basically what I want to do is create this calculated function so that it shows the value : Count of Claims/ Vehicle Years in percentage. However, as you see in the picture it gives me the wrong calculation. I dont know why it does this or what its calculating. If you do 411.70/65 I should get = 0.15788 or 15.788%.
Can someone guide me on what I am doing wrong and what I should do instead?

Thank you

4 REPLIES 4
olv Frequent Visitor

## need help with Divide function

Hello all

I am new to PowerBI and I am having trouble w the Divide Function. Basically what I want to do is create this calculated function so that it shows the value : Count of Claims/ Vehicle Years in percentage. However, as you see in the picture it gives me the wrong calculation. I dont know why it does this or what its calculating. If you do 411.70/65 I should get = 0.15788 or 15.788%.
Can someone guide me on what I am doing wrong and what I should do instead?

Thank you Super User

## Re: need help with Divide function

Hi @olv,

Power BI works as tabular model so when you add a column to your table with a division and add that division to your visual since it will get the division of all rows it will not be the expected result.

You need to add a measure not a column, and the calculations should be:

`Incurred lost frequency = DIVIDE (SUM(BP[Count of Claimms]) ; SUM(BP[Vehicle Years]) )`

Regards,

MFelix

Proud to be a Datanaut!

AkhilAshok Established Member

## Re: Divide Function is not giving me the correct result

The problem is you have created a Claculated Column, instead of Measure. A calculated column will try to compute the DIVIDE function for each row in your your table and store it. Afterwards, when you add it to a Visual (Table or chart), it will try to do a default summarization (could be sum or count) on that column. That is why you see strange numbers.

Best practice is to create Measure whenver possible. In your case, you should create Incurred Loss Frequency as a Measure with the same logic, after ensuring Count of Claim & Vehicle Years are measures as well. Community Support Team

## Re: Divide Function is not giving me the correct result

Hi @olv

As "Count of Claims" and "the Vehichle Year " are columns,

with a measure

`divide3 = DIVIDE(SUM(Sheet5[count-column]),SUM(Sheet5[years]))`

It show the desired result Best Regards

Maggie

Announcements   