This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I use python visual but I use script as below , Ii error.
import numpy as np
import matplotlib.pyplot as plt
dataset = pandas.DataFrame(% Developing(In month), % Developing(Last Month), code and name process)
y = dataset.code and name process
x1 = dataset.% Developing(Last Month)
x2 = dataset.% Developing(In month)
b=plt.barh(y, x1,align="center",color="#66c2a5",label="% Developing(Last Month)")
b2=plt.barh(y, x2,align="center",left=x1,color="#8da0cb",label="% Developing(In month)")
for rect in b:
w = rect.get_width()
plt.text(w-0.05, rect.get_y()+rect.get_height()/2, '{:.0%}'.format(w), ha='left', va='center',fontsize=20)
plt.xticks([0.05, 0.5,0.9, 1],['$on process$', '$continue$', '$On the way$','$Completed$'])
plt.grid(axis="x", which="major",linestyle='-.')
plt.title('custom')
plt.xlabel('xlabel name')
plt.ylabel('ylabel name')
plt.legend()
plt.show()
Guide me about it please.
Hi @Anonymous
What are the other bits in the DataFrame call : and name process ?
The structure of the call to DataFrame doesn't match the documentation.
regards
Phil
Proud to be a Super User!
Hi @Anonymous
Your call to pandas.DataFrame doesn't look right
pandas.DataFrame(% Developing(In month), % Developing(Last Month), code and name process)
Refer to pandas.DataFrame — pandas 1.2.3 documentation (pydata.org)
What is code and name process? It looks like you are trying to pass multiple arguments but I suspect that's not actually what you intend.
What is % Developing(Last Month) meant to be? The index?
Did you test this script in Python outside PBI?
Although PBI allows spaces and special chars like % in names, it's best to avoid using them when you have to deal with other environments.
Regards
Phil
Proud to be a Super User!
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 34 | |
| 29 | |
| 29 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 48 | |
| 33 | |
| 24 | |
| 24 |