Forum Discussion
edit graph
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,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.