Forum Discussion
reporting on data in 3 different models
- 4 years ago
So the pattern I use for hierarchies is to check the scope from the deepest level on up.
See if this makes sense to you:
Status Switch = SWITCH ( TRUE (), ISINSCOPE ( Story[Issue Key] ), SELECTEDVALUE ( Story[Status] ), ISINSCOPE ( Epic[Issue Key] ), SELECTEDVALUE ( Epic[Status] ), ISINSCOPE ( Initiative[Issue Key] ), SELECTEDVALUE ( Initiative[Status] ), ISINSCOPE ( Rollout[Issue Key] ), SELECTEDVALUE ( Rollout[Status] ) )If you aren't familiar with SWITCH ( TRUE(), ... ), I recommend reading this:
https://p3adaptive.com/2015/03/the-diabolical-genius-of-switch-true/
I want the matrix to eventually look like this:
Now I can do it using the formula above, if there is only one layer, but need to work out how to do it another way, if anyone can show me how to use isinscope, i will read the link, but i'm not great at powerbi yet.
So the pattern I use for hierarchies is to check the scope from the deepest level on up.
See if this makes sense to you:
Status Switch =
SWITCH (
TRUE (),
ISINSCOPE ( Story[Issue Key] ), SELECTEDVALUE ( Story[Status] ),
ISINSCOPE ( Epic[Issue Key] ), SELECTEDVALUE ( Epic[Status] ),
ISINSCOPE ( Initiative[Issue Key] ), SELECTEDVALUE ( Initiative[Status] ),
ISINSCOPE ( Rollout[Issue Key] ), SELECTEDVALUE ( Rollout[Status] )
)
If you aren't familiar with SWITCH ( TRUE(), ... ), I recommend reading this:
https://p3adaptive.com/2015/03/the-diabolical-genius-of-switch-true/
- Anonymous4 years agoNot applicable
AlexisOlson It doesn't work for me yet, but i understand how how it should work and will have a proper look on monday when i'm back in the office.
Thanks for your help.
Jeff
- Anonymous4 years agoNot applicable
AlexisOlson I managed to get it to work for my status entry
status 1 =SWITCH (TRUE (),ISINSCOPE ( 'Story/Task'[ISSUE_KEY] ), SELECTEDVALUE ( 'Story/Task'[ISSUE_STATUS_NAME] ),ISINSCOPE ( 'Story/Task'[PARENT_ISSUE_KEY] ), SELECTEDVALUE ( epic[ISSUE_STATUS_NAME] ),ISINSCOPE ( 'Story/Task'[init/roll key]), SELECTEDVALUE ( initiative[ISSUE_STATUS_NAME] ),ISINSCOPE ( 'Story/Task'[init/roll key] ), SELECTEDVALUE ( rollout[ISSUE_STATUS_NAME] ))but for some reason it doesn't work for my Summary entry using the same theorysummary 1 =SWITCH (TRUE (),ISINSCOPE ( 'Story/Task'[SUMMARY] ), SELECTEDVALUE ( 'Story/Task'[SUMMARY] ),ISINSCOPE ( 'Story/Task'[Epic Summary] ), SELECTEDVALUE ( epic[SUMMARY] ),ISINSCOPE ( 'Story/Task'[initiative summary]), SELECTEDVALUE ( initiative[SUMMARY] ),ISINSCOPE ( 'Story/Task'[rollout summary] ), SELECTEDVALUE ( rollout[SUMMARY] ))i thought i'd gotten the idea, but no i lost it less than 5 mins after getting status working.- Anonymous4 years agoNot applicable
I worked it out, they weren't linked by summary, so what i did was
summary 1 =SWITCH (TRUE (),ISINSCOPE ( 'Story/Task'[ISSUE_KEY] ), SELECTEDVALUE ( 'Story/Task'[SUMMARY] ),ISINSCOPE ( 'Story/Task'[PARENT_ISSUE_KEY] ), SELECTEDVALUE ( epic[SUMMARY] ),ISINSCOPE ( 'Story/Task'[init/roll key]), SELECTEDVALUE ( initiative[SUMMARY] ),ISINSCOPE ( 'Story/Task'[init/roll key] ), SELECTEDVALUE ( rollout[SUMMARY] ))now it works like a dream, thanks for your guidance.