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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
JofrainVisda
Advocate I
Advocate I

NaN Error when dividing

Hi friends,

I know this is not a new issue, but I have tried all the possible solutions that I have seen here and nothing worked. Can someone help me on this? Check my screenshots for the reference of what I have tried so far

JofrainVisda_2-1628576096878.png

 

JofrainVisda_0-1628576015577.png

JofrainVisda_1-1628576038047.png

 

 

1 ACCEPTED SOLUTION
JofrainVisda
Advocate I
Advocate I

Thank you for all the suggestions guys. I have solved the issue by using the quick measure. It generated this formula
Productivity Ratio = Divide(Sum([Volume2]),Sum([Headcount2])) which I haven't tried. The SUM function is like converting them into a measure from being a column.

View solution in original post

6 REPLIES 6
JofrainVisda
Advocate I
Advocate I

Thank you for all the suggestions guys. I have solved the issue by using the quick measure. It generated this formula
Productivity Ratio = Divide(Sum([Volume2]),Sum([Headcount2])) which I haven't tried. The SUM function is like converting them into a measure from being a column.

vanessafvg
Super User
Super User

its difficult to understand what is going on there without seeing all the underlying data.

 

divide would be the correct function to use in my opinion, what are you trying to do?   can you provide some sample data?   is volume2 a column or a aggregation?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Hello! Well as you can see there are numbers for Volume and Headcount columns. These figures are correct already. But when I divide them, I get the NaN or infinity error. Both of them are calculated columns. Using Divide function gives me incorrect result. It should give me 280 and not 774K.

what is the calculated column code?   there is something underlying going on which is not visible in what you have posted so it would be very hard to tell you .  





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




The Volume and Headcount columns have complicated logic actually. There are combinations of multiple columns. Here is Volume's code

JofrainVisda_0-1628577762405.png.
And here is the productivity2

JofrainVisda_1-1628577861048.png

 

Hi @JofrainVisda 

Productivity Ratio = Divide([Volume2],[Productivity2])

try this.

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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