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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
marcel97
Helper II
Helper II

Issues with data hierachy/multiple columns in matrix visualization

Hello all,

 

I am experiencing the following problem:

 

Each month I check, whether all teams within my organization have completed a specific task. I have constructed a report that allows me to keep track of that with the help of a table visualization (see below). 

 

Sample111.PNG

As I have more than 200 teams to take care of, I decided that I no longer want to contact the teamlead only, but their department head also (=> a higher level) while still being able to track all the team's status on whether they completed the task or not. However, this is where I run into problems.

 

I changed the visualization from a table to a matrix to implement the department->team hierarchy. If I only look at the completion status, this solution seems to work quite well:

 

marcel97_3-1637675361232.png

 

As I want to contact the respective department heads and team leads, I want to add their names to the matrix.

 

I use the following raw data (sample due to data protection):

 

TEAM_IDTEAM_SHORTNAMEPARENT_TEAM_IDPARENT_TEAMTEAM_LONGNAMETEAMLEADTASK_COMPLETIONHAS_TO_DO_TASK
1ADWS1  Software DepartmentAngela Merkel False
11ADWS111ADWS1Software Team 1Max Mustermann100,00 %True
12ADWS121ADWS1Software Team 2Paul McCartney100,00 %True
13ADWS131ADWS1Software Team 3Shawn Carter100,00 %True
14ADWS141ADWS1Software Team 4John Lennon0,00 %True

 

As you can see, the department head is "Angela Merkel". When I add TEAMLEAD to the value section of the matrix visualization however, "John Lennon" is shown as the department head. Of course this happens because the data is summarized in that row and not sourced from the raw data.

 

marcel97_2-1637675308786.png

 

So I thought about creating a calculated column where I use CONCATENATE to have a single expression for team/department identifier and team lead/department head (e.g. "ADWS1 (Angela Merkel)" or "ADWS11 (Max Mustermann)") and use that as my hierachy/row. But surely there must be a more elegant way to do this and to display the identifier and the team lead in separate columns?

 

Any help is much appreciated!

 

Thanks a lot in advance and kind regards

Marcel

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @marcel97 ,

Please recreate a  new measure.

 

Measure 2 = var aa = IF(SELECTEDVALUE('Table'[PARENT_TEAM])<>BLANK(),SELECTEDVALUE('Table'[PARENT_TEAM]),SELECTEDVALUE('Table'[TEAM_SHORTNAME]))
return 
if(ISINSCOPE('Table'[TEAM_SHORTNAME]),[Measure],CALCULATE(MAX('Table'[TEAMLEAD]),FILTER(ALL('Table'),'Table'[PARENT_TEAM]=BLANK()&&'Table'[TEAM_SHORTNAME]=aa)))

 

11.PNG

Then filter the PARENT_TEAM.

11.PNG

11.PNG

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
marcel97
Helper II
Helper II

Can't thank you enough @Anonymous ! This is exaclty what I was looking for!

 

Thanks a lot and kind regards! 🙂

Marcel

Anonymous
Not applicable

Hi @marcel97 .

Please have a try,

Create a measure.

Measure = SELECTEDVALUE('Table'[TEAMLEAD])

11.PNG

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks a lot @Anonymous ! I could recreate this with ease in my file 🙂 

 

At least there is no more incorrect teamlead shown at department level. Is there a way however to show the department head there also? See below:

 

SAMPLE30.PNG

Appreciate any help! Thanks and kind regards

Marcel

 

Anonymous
Not applicable

Hi @marcel97 ,

Where do you want to show the department head? And which column is the the department head? Please provide your desired output.

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks for the quick response @Anonymous .

 

My raw data does not differentiate between Teamleads and Department Heads, they are both in Column TEAMLEAD. However, via my TEAM_ID and PARENT_TEAM_ID my data implies a hierarchy with parents being departments and children being teams.

 

ADWS1 for example is parent to all other teams (=> department of those teams) and has Angela Merkel as a teamlead (=>department head).

 

Ideally the department head should show up in the same column in my visualization as the teamleads of the child teams under it (as shown in the attachment to my last reply).

 

However, I'm open to alternative solutions if that's not possible.

 

Thanks!

Marcel

 

 

Anonymous
Not applicable

Hi @marcel97 ,

Please recreate a  new measure.

 

Measure 2 = var aa = IF(SELECTEDVALUE('Table'[PARENT_TEAM])<>BLANK(),SELECTEDVALUE('Table'[PARENT_TEAM]),SELECTEDVALUE('Table'[TEAM_SHORTNAME]))
return 
if(ISINSCOPE('Table'[TEAM_SHORTNAME]),[Measure],CALCULATE(MAX('Table'[TEAMLEAD]),FILTER(ALL('Table'),'Table'[PARENT_TEAM]=BLANK()&&'Table'[TEAM_SHORTNAME]=aa)))

 

11.PNG

Then filter the PARENT_TEAM.

11.PNG

11.PNG

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hey @Anonymous ! I'd have to ask another question regarding this topic. If I had more than one level in my hierarchy, how would I need to adjust the measure(s)? E.g. I have ADWS1 as my department, ADWS11 as a team an ADWS111 as a subteam. The PARENT_TEAM_ID to ADWS11 is not blank and I had issues figuring out how to adjust your measure.

 

Please find attached the raw data:

 

 

TEAM_IDTEAM_SHORTNAMEPARENT_TEAM_IDL1L2L3TEAM_LONGNAMETEAMLEADTASK_COMPLETIONHAS_TO_DO_TASKPATH
1ADWS1 ADWS1  Software DepartmentAngela Merkel False1
11ADWS111ADWS1ADWS11 Software Team 1Max Mustermann False1|11
111ADWS11111ADWS1ADWS11ADWS111Software Subteam 11Maxime Musterfrau1True1|11|111
112ADWS11211ADWS1ADWS11ADWS112Software Subteam 12Barack Obama1True1|11|112
12ADWS121ADWS1ADWS12 Software Team 2Paul McCartney1True1|12
13ADWS131ADWS1ADWS13 Software Team 3Shawn Carter1True1|13
14ADWS141ADWS1ADWS14 Software Team 4John Lennon0True1|14

 

Again, I would need to have the Teamleads (Max Mustermann for ADWS11 and Angela Merkel for ADWS1) in the same column:

 

SAMPLE4.PNG

Any idea is greatly appreciated!

 

Cheers 

Marcel

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.