Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
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
Solved! Go to Solution.
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.
Proud to be a Super User! | |
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!
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!
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.
Proud to be a Super User! | |
User | Count |
---|---|
89 | |
88 | |
85 | |
80 | |
49 |
User | Count |
---|---|
150 | |
142 | |
112 | |
73 | |
55 |