简体   繁体   English

在 Power BI 中使用 Python Visual 创建冰柱图

[英]Creating an Icicle Chart using Python Visual in Power BI

I am trying to create an icicle chart for a company hierarchy.我正在尝试为公司层次结构创建一个冰柱图。 Our company uses Power BI for it's reports and I can see that there isn't an icicle visual within Power BI but that one can be created using the Python Visual option.我们公司使用 Power BI 作为报告,我可以看到 Power BI 中没有冰柱视觉效果,但可以使用 Python 视觉选项创建冰柱视觉效果。 I have a little bit of basic experience with Python but am struggling with the code within Power BI.我对 Python 有一点基本经验,但在 Power BI 中的代码方面遇到了困难。

I have a data table within Power BI called "Data", which contains columns "Employee", "FirstManager", "SecondManager" and "Value".我在 Power BI 中有一个名为“Data”的数据表,其中包含“Employee”、“FirstManager”、“SecondManager”和“Value”列。 The "Value" column simply contains a value of 1 for every employee so that the icicle chart will be the same width for each employee. “值”列仅包含每个员工的值 1,以便每个员工的冰柱图的宽度相同。

I would like the chart to show as "SecondManager" > "FirstManager" > "Employee".我希望图表显示为“SecondManager”>“FirstManager”>“Employee”。

Would anyone be able to help with the code for this within the Power BI Python Visual?任何人都可以在 Power BI Python Visual 中提供此代码吗? I am specifically struggling with how the Power BI table is added to the dataframe.我特别纠结于如何将 Power BI 表添加到 dataframe。

Thank you!谢谢!

Just follow the docs here, it's plain vanilla: Create Power BI visuals by using Python只需按照此处的文档进行操作,这很简单: 使用 Python 创建 Power BI 视觉效果

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

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