Forum Discussion
Requirement: Decomposition Tree for Process Management
- 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
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
- Kusaadigarla011 year agoFrequent Visitor
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- Anonymous1 year agoNot applicable
As you mentioned that using different logic worked, please accept helpful post as the solution. This will help other community members with similar problems solve them faster.
Thank you.
- v-lgarikapat1 year agoCommunity Support
Hi Kusaadigarla01 ,
If your issue has been resolved, please consider marking the most helpful reply as the accepted solution. This helps other community members who may encounter the same issue to find answers more efficiently.
If you're still facing challenges, feel free to let us know we’ll be glad to assist you further.
Looking forward to your response.
Best regards,
LakshmiNarayana