Power BI - 组合聚集条形图中的列会更改数据值
我将多个源表中的数据合并到一个包含许多计算列的合并表中。
我的主要兴趣是比较许多不同工作包的迟到、推迟和各种其他条件的作业数量。 X 轴具有工作包的名称,并筛选为“按延迟完成的作业排名前 15 个”。
单独而言,所有工作状态计数都正常工作,即我可以为它们构建单独的条形图。
当我将 2 个或更多值带入图表中以制作聚集条形图时,计数全部更改为错误值。我正在以适合的方式过滤每个显示的值(例如“LATE”、“INCOMPLETE”、“DEFERRED”等。这些都是计算列中的文本值。
我必须遗漏一些基本内容 - 为什么将第二个值添加到图表中会对前一个值产生影响吗?为什么
我准备了图像来演示这一点,但我没有上传它们的权限。简单地说:
- 图 1 显示了延迟作业的数量。 ,带有一个工作包包含 660 个
- 图 2 显示了迟到作业的计数,同一工作包包含 279
- 个 图 3 显示了每个工作包的两个条形图,即迟到作业和延迟作业 现在,特定工作包的迟到作业和延迟作业(以及所有作业)计数均为 230。其他工作包的两个栏的计数相同)。对于“延迟”作业或“延迟”作业,此计数不正确。
作业不能同时出现在“延迟”和“延迟”列中 - 它们是互斥的
。 (1) 为什么添加第二个值会影响图表中的现有值? (2) 从多个计算列构建聚集条形图可能需要哪些传统步骤?
谢谢
I am combining data from multiple source tables into a single, consolidated table, with many calculated columns.
My main interest is to compare the counts for jobs that are late, deferred, and various other conditions, for many different work packs. The X axis has the name of work packs, and is filtered to "Top 15 by jobs late finished".
Individually, all of the counts of job status work properly, i.e. I can build separate bar charts for them.
When I bring 2 or more values into the chart to make a clustered bar chart, the counts are all change to wrong values. I am filtering each displayed value in a way that is appropriate for it (e.g. "LATE", "INCOMPLETE", "DEFERRED", and so on. These are all text values in calculated columns.
I must be missing something basic - why does bringing a second value into the chart have an effect on the previous value? And why are they both wrong after this?
I prepared images to demonstrate this but I don't have privileges to upload them. Briefly:
- Chart 1 shows count of Deferred jobs, with one work pack containing 660
- Chart 2 shows count of Late jobs, with the same work pack containing 279
- Chart 3 shows two bars per work pack, Late and Deferred. The particular work pack now has a count of 230 for both Late jobs and Deferred jobs (and all other work packs have both of their bars with the same count). This count is not correct for either Deferred jobs or Late jobs.
A job can't be in both Deferred and Late columns - they are exclusive.
Questions:
(1) Why does adding a second value affect an existing value in the chart?
(2) What traditional steps might be necessary to build a clustered bar chart from multiple calculated columns?
thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现我计算文本值的方法(“LATE”、“DEFERRED”等)无法使用。尝试在图表簇中显示多个 COUNT 值会导致计数不正确。
通过将数据类型更改为“整数”并计算 0 或 1 的值解决了该问题。这些值可用于每个度量中的 SUM,并在图表中给出互不影响的各个条形。
最初的方法对我来说似乎有效,并且在 Excel 中当然有效,但在 Power BI 中似乎不可接受。
I found that my method of calculating a text value ("LATE", "DEFERRED", etc) cannot be used. Attempting to display multiple COUNT values in a chart cluster gives incorrect counts.
The problem was resolved by changing the data type to "Whole Number" and calculating values of either 0 or 1. These values can be used for SUM in each measure, and give individual bars in the chart that do not affect each other.
The original approach seems valid to me and certainly works in Excel, but it just seems to be unacceptable in Power BI.