Reply
JofrainVisda
Advocate I
Advocate I
Partially syndicated - Outbound

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

Syndicated - Outbound

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

Syndicated - Outbound

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

Syndicated - Outbound

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!




Syndicated - Outbound

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.

Syndicated - Outbound

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!




Syndicated - Outbound

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

 

Syndicated - Outbound

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.

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)