Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
olv
Regular 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
olv
Regular Visitor

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

 

 

View solution in original post

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

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

5.png

 

Best Regards

Maggie

 

 

olv
Regular Visitor

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

 

 

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

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



AkhilAshok
Solution Sage
Solution Sage

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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.