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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Divide Numerator by Denominator - Row Level

Hi, would anyone be able to assist with the measure to divide the Yield(Numerator) by the Volume for each asset class? I've created 2 measures for each but when I divide to get to the yield, I'm getting an "NaN" or 0 value. I believe the complexity is because yield and volume is at the row level? *please note denominator figures are in millions

2 ACCEPTED SOLUTIONS
Solution Supplier

I think the issue is that you can't divide by zero ... 🤠
Assuming your numerator and denominator values are "normal" (i.e. not a result of a complex measure), and in a number format, dividing the two should not kick back any errors.

Community Support

Hi @dkdirenzo ,

Thanks for the reply from ScottShearer and ExcelMonke .

Use the Divide function for division instead of “/”.

I have the same problem as you when I use “/”.

For more information about the Divide function see:

DIVIDE function (DAX) - DAX | Microsoft Learn

Can you try this Measure below:

``Measure = DIVIDE(MAX('Table'[Denominator]), MAX('Table'[Numerator]),0)``

I noticed in your screenshot that either the numerator is 0 or the denominator is 0 .

0 divided by any number is 0, and in my Measure syntax I set it to return 0 if it divides by 0, so when I use the data in the screenshot, the result is all 0, so I added a row of non-0 data.

The final page result is as follows:

The pbix file is attached.

If you have any other questions please feel free to contact me.

Best Regards,
Yang
Community Support Team

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

3 REPLIES 3
Community Support

Hi @dkdirenzo ,

Thanks for the reply from ScottShearer and ExcelMonke .

Use the Divide function for division instead of “/”.

I have the same problem as you when I use “/”.

For more information about the Divide function see:

DIVIDE function (DAX) - DAX | Microsoft Learn

Can you try this Measure below:

``Measure = DIVIDE(MAX('Table'[Denominator]), MAX('Table'[Numerator]),0)``

I noticed in your screenshot that either the numerator is 0 or the denominator is 0 .

0 divided by any number is 0, and in my Measure syntax I set it to return 0 if it divides by 0, so when I use the data in the screenshot, the result is all 0, so I added a row of non-0 data.

The final page result is as follows:

The pbix file is attached.

If you have any other questions please feel free to contact me.

Best Regards,
Yang
Community Support Team

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Resolver I

Are you using the DIVIDE function?

Solution Supplier

I think the issue is that you can't divide by zero ... 🤠
Assuming your numerator and denominator values are "normal" (i.e. not a result of a complex measure), and in a number format, dividing the two should not kick back any errors.

## Helpful resources

Announcements

#### Power BI Monthly Update - July 2024

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

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors