Forum Discussion
Kusaadigarla01
1 year agoFrequent Visitor
Requirement: Decomposition Tree for Process Management
Hi, Please help in below requirement. and check the sample data below for this requirement. Requirement: Decomposition Tree for Process Management We need to create a decomposition tree for pr...
- 1 year ago
Hi, Thanks for your help.
Actually it was working for sample data which i have provided in query but when i apply same logic on real time data(same kind of data) it was not working.
Tried the different logic and it is working.
check the logic below.
TaskStatusColor_Corrected =VAR CurrentNodeLevel =SWITCH(TRUE(),NOT(ISBLANK(SELECTEDVALUE('Sheet1'[Input]))), "Input",NOT(ISBLANK(SELECTEDVALUE('Sheet1'[Sub Function]))), "Sub Function",NOT(ISBLANK(SELECTEDVALUE('Sheet1'[Business Function]))), "Business Function","Head")VAR HasPendingChildren =SWITCH(CurrentNodeLevel,"Input", SELECTEDVALUE('Sheet1'[Status New]) <> "Completed","Sub Function",CALCULATE(COUNTROWS(FILTER('Sheet1', 'Sheet1'[Status New] = "Pending")),ALLEXCEPT('Sheet1', 'Sheet1'[Sub Function])) > 0,"Business Function",CALCULATE(COUNTROWS(FILTER('Sheet1', 'Sheet1'[Status New] = "Pending")),ALLEXCEPT('Sheet1', 'Sheet1'[Business Function])) > 0,"Head",CALCULATE(COUNTROWS(FILTER('Sheet1', 'Sheet1'[Status New] = "Pending")),ALL('Sheet1')) > 0,FALSE())RETURNIF(HasPendingChildren, "Red", "Green")Regards,Kusa
andrewsommer
1 year agoSuper User
Define a measure that assigns color:
Task_Status_Color =
IF(
MAX('Table'[Level 3 Status]) = "Completed",
"Green",
"Red"
)Then another measure for levels 1 and 2 that uses aggregate logic
Level_Status_Color =
IF(
MINX(FILTER('Table', 'Table'[Level 2] = SELECTEDVALUE('Table'[Level 2])), 'Table'[Level 3 Status]) = "Completed",
"Green",
"Red"
)Set up your decomposition tree using a conditional formatting rule on bars based on the color measure.
Please mark this post as solution if it helps you. Appreciate Kudos.