使用 PowerBi 可视化移位顺序数据的合适图表
问题描述
需要为 Shift-wise 状态变化数据绘制图表.我使用 python Jupyter 绘制堆栈条形图.
jupyter 的示例数据集和输出如下所示.
输出:
但是当我要使用 powerbi 堆栈条形图来绘制它时.它显示聚合,而不是实际值.
例如:03-01 Day First START >STOPPED>RUNNING>STOPPED 并继续......在 powerBi 堆栈栏中显示 STOPPED、RUNNING 和其他状态(聚合值(总和)而不是实际值与顺序).有什么方法可以得到与 jupyter notebook 相同的输出.
非常感谢您的支持!!!
解决方案您需要为每个数据点创建一个具有唯一值的列,例如日期/时间值.然后将该值用于堆积柱形图的图例中.
当然,这不会对您的状态值进行颜色编码,因此这也不是理想的解决方案.
但是如果 Python 可以生成你想要的图表,你为什么不在 Power BI 中使用它呢??
Need to plot chart for Shift-wise state change data. I plot the stack bar chart using python Jupyter.
Sample dataset and output from jupyter is shown below.
Output:
But when I'm going to plot this using powerbi Stack bar chart. It shows aggregates ,instead of real values.
Ex: 03-01 Day First START >STOPPED> RUNNING>STOPPED and goes on...... In powerBi stack bar shows STOPPED,RUNNING and other states' (aggregate values(summations) instead of real values with order). Is there any way to get the same output as i have got from jupyter notebook.?
Really appreciate your support!!!
解决方案You will need a column with unique values for each data point, like a date/time value. Then use that value into the Legend of the stacked column chart.
That, of course, will not colour code your state values, so that's also not an ideal solution.
But if Python can produce the chart you want, why don't you use that in Power BI??
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-visuals
相关文章