Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

reporting on data in 3 different models

Ok, I come to the many for help again.

 

So i have the following models:

 

This is the initiative level,  1 of 2 top level items

JeffT_3-1649323947310.png

Rollout level is at the same level as Initiative

JeffT_4-1649324001809.png

These 2 levels are are linked to a higher level RMPM by parent issue key, but thats not important, as I only want to report on this level.

 

This is the epic level, linked to either initiative or rollout via the parent issue key

JeffT_5-1649324172205.png

 

The below is the story/task model, which is linked to the epic model by Parent issue key

JeffT_6-1649324285544.png

 

What i want to is display this is a matrix, i have managed to create the first part creating a hierarchy by using the related function on the epics model to collect all the parent issues into a new column, so it can go from the top level down to tasks and stories.

 

Now where i am having difficulty is picking up the different statuses at each level, if it was only 1 level up, i would use 

Issue Status 2 =
IF(
HASONEVALUE('Task'[ISSUE_KEY]),
MAX('Task'[ISSUE_STATUS_NAME]),
RELATED('Epic'[ISSUE_STATUS_NAME])
)
 
But because I want to see the status of the initiative and rollout as well, I'm stuck. Can anyone help, I'm guessing if this one can be solved i can use the same solution to do the same for the summary as well
 
Any help greatly appreciated,
Jeff

 

1 ACCEPTED SOLUTION

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/

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Forgot to tag you @AlexisOlson 

Anonymous
Not applicable

I want the matrix to eventually look like this:

 

JeffT_0-1649400810157.png

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/

Anonymous
Not 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 theory
 
summary 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.
Anonymous
Not 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.
Anonymous
Not 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

AlexisOlson
Super User
Super User

I don't entirely follow what you're asking but when dealing with hierarchy aggregations, I find ISINSCOPE to be a useful function.

 

More detail here:

https://www.sqlbi.com/articles/distinguishing-hasonevalue-from-isinscope/

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors