除以零显示值
在进行报告时显示除以 0 错误的结果的最佳方法(对用户来说最直观)或最佳实践是什么?然而,在报告中,当我将其显示在人类可读的报告上时,我捕获了此错误;我不知道如何注意这一点。
一个例子是重量/收入比率。对于给定的码头,在给定的一天,可能没有收入,但可能已经运送了一些货物(有重量)。
我正在查看的当前报告通过在列中放置 0 来处理此问题,但是,这可能会产生误导,因为这在技术上并不正确。
另一种想法是将其留空;然而,用户不知道为什么该字段留空。
我还考虑了标准 Excel 错误 #DIV/0!
但是,这往往会使报告看起来混乱。
我很好奇其他人过去针对这种情况做了什么。
What is the best way (most intuitive to users) or best practice for displaying the results of a divide by 0 error when doing reporting? Within the report, I capture this error, however, when displaying it on a human readable report; I am not sure how to note this.
An example would be something like Weight / Revenue ratio. For a given terminal, on a given day, there may have been no revenue, but some shipments (which would have weight) may have been shipped.
The current reports that I am looking at, handle this by placing a 0 in the column, however, this could be misleading, as this is not technically true.
Another thought would be to leave it blank; however, it would be unknown to the user why the field was left blank.
I also considered the standard Excel error, #DIV/0!
however, this tends to make the report looked clutter.
I am curious what others have done in the past for this situation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
在我们的系统中,我们使用空格或“NaN”(表示非数字),有时还使用星号“*”,具体取决于最终用户的偏好。 (我们在规划阶段给他们选择。)
On ours, we use either a blank space or "NaN" (for Not a Number) and sometimes an asterisk "*" depending on what the end user prefers. (We give them a choice in the planning stage.)
我过去曾使用过一个“-”,尤其是在进行 Excel 工作时。从最佳实践的角度来看,我认为“0*”,底部带有“*该部门没有收入”注释。
I've used a single "-" in the past, especially when doing excel work. From a best practices point of view I think "0*" with a *This division has no revenue" note at the bottom.
如果混乱是一个问题,那么用错误符号代替怎么样?如果颜色可用,则可以使用红色“X”。如果通常是黑白的,可能是“E”。在页眉和页脚中添加图例以指示符号的含义。
If clutter is a concern, how about an error symbol instead? If color is available, a red "X" could work. If usually black and white, perhaps an "E". Include a legend in the header and footer to indicate what the symbol symbolizes.
根据具体情况,我们针对此类情况制定了两种不同的政策。 “不适用”或“错误”。
We've got two different policies for that sort of case, depending of the context. Either "N/A" or "Error".
最佳实践取决于除以零在上下文中的含义。
任何报告的目的都是沟通。对于业务方面来说,NaN 或 #DIV/0 不会传达任何信息。他们需要知道到底发生了什么。
如果有合理的理由使该值为零,则意味着计算出的指标不相关。您指出,有时收入实际上为零,并且显示类似 N/A 的内容是合理的(顺便说一下,业务方面的每个人都应该熟悉它 - 这是一个非常常见的缩写)。
但是,如果没有正当理由,那么它就是一个错误,应该如此显示或完全排除。在您的情况下,权重也可能为零,但我们假设它不是零 - 权重为零意味着源数据中存在错误。在这种情况下,您的选择是从报告中完全删除该项目(天,无论什么),或者使用将其标记为错误的内容(例如“错误”)来显示它。
The best practice depends on what the divide by zero means in context.
The purpose of any report is communication. To the business side, nothing is communicated by NaN, or #DIV/0. They need to know what's actually happening.
If there's a legitimate reason for the value to be zero, it means the calculated metric is irrelevant. You point out that sometimes, revenue is legitimately zero, and it's reasonable to show something like N/A (which, by the way, should be familiar to just about everyone on the business side - it's a very common abbreviation).
However, if there's no legitimate reason, then it's an error, and should either be shown as such or excluded altogether. In your situation, weight also might be zero, but let's pretend it's not - that a weight of zero means there's an error in the source data. In that situation, your choice is either to drop that item(day,whatever) altogether from the report, or or show it with something which marks it as an error (like "Error").
您可能需要考虑的其他选择是
N/A - 不适用
N/R - 无结果
NRP - 不可能有结果
类似地,假设您的目标受众不是程序员。
您只需向每个用户解释 N/A 的含义 5 或 6 次,他们就会开始记住它。
Other options you might like to consider are
N/A - not applicable
N/R - no result
NRP - no result possible
and similar, assuming that your target audience are not programmers.
You should only have to explain the meaning of N/A to each user 5 or 6 times before they start to remember it.
您可以尝试以下其中一项:
我喜欢第二个,因为 IMO 它实际上只读取五个字符:
Error Divide by Zero
You could try one of the following:
I like the 2nd one because IMO it actually reads, in only five characters:
Error Divide by Zero