Forum Discussion
One Measure Working, The other is not...
Hi,
I have a table showing On Time and Quality metrics.
For any blank values in 'OnTime Pcnt' or 'Quality %' columns I would like it to return 'NDR' rather than '0' so that I can decipher between suppliers that have delivered nothing at all, and those that have delivered but everything was late and/or had quality issues.
I can get it to do this for 'OnTime Pcnt'. For some reason it's not working for 'Quality %', even though they're both using the same DAX formula.
Any help as to why or how to fix it is appreciated!
Thanks.
1 Reply
- AnonymousNot applicable
Hi,GOLEARY735 .I am glad to help you.
According to your description, both of your measures are written in the same way, but do not show the correct result for a specific value. ([Quanlity%] should have displayed an incorrectly calculated “NDR”, but it unexpectedly succeeded in calculating it and returned 0.00.)
Here is my suggestion for your problem:I noticed that the measure you gave for the problem [Quanlity%] shows 0.00, but the measure name you gave for the measure code is [Quality Pcent], could you please check if you have put [Quality Pcent] into visual normally, or changed the measure name ( If this is the case, then that would solve my doubt)
Back to your question itself. I noticed that you are using two other measures in [Quality Pcent], [AcceptedQnty] and [ReceiptQnty], and I would suggest that you put both of these measures into the visual to show the results of the calculations for each line, to see if it's the case that [ReceiptQnty] isn't calculating to 0 or if it's something else that would cause the ERROR to go off. or some other error data that would cause the ERROR function to execute, causing [Quanlity%] to be calculated correctly.
Also check that [AcceptedQnty] is calculated correctly for rows of data that were accidentally calculated as 0.00.
Could you please place these two measures in the visuals shown in your screenshot, making sure that the calculation environment is consistent across all the measures shown, so that you can identify the problem more intuitively?If possible, please analyze the pbix file that does not contain sensitive data and provide additional screenshots that will help resolve your issue.
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&data=05%7C02%7Cv-jianpengli%40microsoft.com%7Cd9552f18a0c94a7564f308dc188bf35e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638412236574903368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3jxUE%2BTNC8dS4DIhPphEB3NA%2BK94pwURGHu%2BXC4eezw%3D&reserved=0
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.