Forum Discussion
edit graph
Hi Anonymous ,
This is a known limitation:
Python visuals in Power BI Desktop have a few limitations:
• Data size limitations. Data used by the Python visual for plotting is limited to 150,000 rows. If more than 150,000 rows are selected, only the top 150,000 rows are used and a message is displayed on the image. Additionally, the input data has a limit of 250 MB.
• Resolution. All Python visuals are displayed at 72 DPI.
• Calculation time limitation. If a Python visual calculation exceeds five minutes the execution times out which results in an error.
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-visuals#known-limitations
There is no good solution. My suggestion is to create a separate table to store the summarized values (90%, 5%, 80%, 10%), and use the data in this table to create Python visual. Reduce the calculation time in power BI, but it no longer changes dynamically.
Best Regards,
Winniz
v-kkf-msft Kindly find excel attached as below. File Excel (Input)
but I want add new requirement as below.
1. sort status by on the way , deploy , Get requirement , Compleated and blank
2. If status = on the way sort by lowerst to highest
Guide me about it please.
Thank you for your help me.
- v-kkf-msft5 years agoCommunity Support
Hi Anonymous ,
Create a calculate column:
Sort Order = var a = CALCULATE( COUNTROWS('Table'), FILTER( ALL('Table'), 'Table'[Developing_In_month] <= EARLIER('Table'[Developing_In_month]) &&'Table'[Status_2021] = "on the way" ) ) return SWITCH( 'Table'[Status_2021], "on the way",1+0.1*a, "Deploy", 2, "Get requirement", 3, "Completed", 4, 5 )Select the Code column, and select the Sort Order column in the Sort by column drop-down list.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous5 years agoNot applicable
v-kkf-msft I want to show in graph .
But order by sort.
- v-kkf-msft5 years agoCommunity Support
Hi Anonymous ,
First create a calculated column Sort_Order. Then create Python visual objects.
Sort_Order = var a = CALCULATE( COUNTROWS('Table'), FILTER( ALL('Table'), 'Table'[Developing_In_month] <= EARLIER('Table'[Developing_In_month]) &&'Table'[Status_2021] = "on the way" ) ) return SWITCH( 'Table'[Status_2021], "on the way",1+0.1*a, "Deploy", 2, "Get requirement", 3, "Completed", 4, 5 )import numpy as np import matplotlib.pyplot as plt dataset.columns = ["Code","Developing_In_month", "Developing_Last_Month", "Sort_Order"] dataset.sort_values(by = 'Sort_Order',ascending = False,inplace = True) y = dataset.Code 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()If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous5 years agoNot applicable
v-kkf-msft from your dax in yellow highlight as below.
I want to sort status on the way by sum value Developing_in_Month and Developing_Last_Month.
Please guide me.
- v-kkf-msft5 years agoCommunity Support
Hi Anonymous ,
Modify calculated column Sort_Order:
Sort_Order = var a = CALCULATE( COUNTROWS('Table'), FILTER( ALL('Table'), ('Table'[Developing_In_month]+'Table'[Developing_Last_Month]) <= EARLIER('Table'[Developing_In_month]) + EARLIER('Table'[Developing_Last_Month]) &&'Table'[Status_2021] = "on the way" ) ) return SWITCH( 'Table'[Status_2021], "on the way",1+0.1*a, "Deploy", 2, "Get requirement", 3, "Completed", 4, 5 )Best Regards,
Winniz - Anonymous5 years agoNot applicable
v-kkf-msft It show can't display the visual same (python)
my data have 120 rows and 35 columns.
Help me please.