简体   繁体   English

在 Power BI 中为图表中的每个值拆分 x 轴

[英]Split x axis for every value in graph, in Power BI

I have the following graph in Power BI:我在 Power BI 中有以下图表:

我的图表截图

and I'm trying to recreate the below graph from Excel (note the X axis with the months February and January, with the Operation Text :我试图重新从下面的图从Excel(注意与月月和一月X轴,Operation Text

excel图表截图

As you can see, my attempt only displays the Operation Text rather than the month and Operation Text ).如您所见,我的尝试仅显示Operation Text而不是月份Operation Text )。

Here is what my current axis looks like:这是我当前的轴的样子:

轴截图

Changing the axis to have Actual Start Date on top, rather than the Operation Text :更改轴以在顶部显示Actual Start Date ,而不是Operation Text

顶部带有开始日期的轴

Makes my graph look like this:让我的图表看起来像这样:

坐标轴变化后的图形

Is it possible to achieve the same outcome as in Excel, with the values in my graph showing the two months side by side, for each operation text?对于每个操作文本,是否有可能获得与 Excel 相同的结果,我的图表中的值并排显示两个月? If so, how can I do this?如果是这样,我该怎么做?

I've tried looking into the X axis 'format' settings and wasn't able to see anything obvious to help achieve this.我试过查看 X 轴的“格式”设置,但看不到任何明显的东西来帮助实现这一目标。 In addition, unfortunately the graph I'm looking to recreate is only a screenshot so I am unable to see how it achieves that outcome.此外,不幸的是,我想要重新创建的图表只是一个屏幕截图,所以我无法看到它是如何实现这一结果的。

EDIT:编辑:

As suggested, I attempted to place Operation Text into the Legend field in my Visualisations section but I am unable to, due to the fact that I have two Value fields (the two columns Actual Hours and Estimated Hours ).按照建议,我尝试将Operation Text放入我的Visualisations部分的Legend字段中,但由于我有两个Value字段(两列Actual HoursEstimated Hours ),我无法这样做。

@CR7SMS is correct. @CR7SMS 是正确的。 You just need to expand down to the next level using that split arrow in the upper right of the visual so that this:您只需要使用视觉右上角的拆分箭头向下扩展到下一个级别,以便:

顶层

Becomes this:变成这样:

第二级

Note that to get the axis to look like this, you'll need to sort on month rather than one of the measures.请注意,要使轴看起来像这样,您需要按月排序而不是按度量之一排序。

种类

You'll also want to turn off 'Concatenate labels' toggle in the 'Format > X axis' section of the visual settings.您还需要在视觉设置的“格式 > X 轴”部分关闭“连接标签”切换。

格式化 X 轴

You would have to drill down one level, using the arrows seen at the top right of your first screenshot.您必须使用第一个屏幕截图右上角的箭头向下钻取一个级别。 For your specific purposes, the split arrow should do the trick.对于您的特定目的,拆分箭头应该可以解决问题。 Hope this helps.希望这可以帮助。

Have you tried moving your date or operation text column in legend section ?..not 100% but something close to your requirement you can achieve您是否尝试过在图例部分移动日期或操作文本列?..不是 100% 但接近您可以实现的要求

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM