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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Alisea_MI
Advocate III
Advocate III

Project Hierarchy from Power Bi Goals to Gantt 223 chart

Hi Community!

 

I have a direct query to MS Goals scorecard, created in the PBI Service, where the project hierarchy looks like below.

 

community 1.png

I need to replicate the  hierarchy above  in the Gantt 223 chart.  My target is to get a project hierarchy with the 3 levels as above.

-level 1 target

-level 2 project #1

-level 3 subproject 1

-level 3 subproject 2

-level 2 project #2

 

When I put a Parent ID on Parent, I get the below. My issues with this is that:

1) it does not show the project name, only the ID 

2) it groups level 2 in one group and level 2 in another group, while I need the following:

 

community 2.png

 

I have also tested Gantt Chat by MAC and didn't manage to replicate the hierarchy either.

Is it possible to achieve the same project hierarchy in the gantt visuals as in the goals on the Power Bi Service?

The structure I need is below.

-level 1 target

-level 2 project #1

-level 3 subproject 1

-level 3 subproject 2

-level 2 project #2

 

Many thanks for all the input!

 

1 ACCEPTED SOLUTION

Hi @Alisea_MI ,

 

According to your description ,here are my steps you can follow as a solution.

(1)This is my test data. 

vtangjiemsft_0-1666685938762.png

(2)We can create  a calculate column.

Parent_name = var _parent_id = 'Table'[Parent id]
var _t  =FILTER( 'Table' , 'Table'[id] = _parent_id)
return
IF(_parent_id=BLANK() , 'Table'[name], MAXX(_t, [name]))

(3)Put the calculate column  [Parent_name] to the Parent field.

 

Best Regards,

Neeko Tang

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

5 REPLIES 5
v-tangjie-msft
Community Support
Community Support

Hi @Alisea_MI ,

 

The most flexible way to include hierarchy is the use of a so-called parent-child relation. To achieve this, we’ll create a column in which a child refers to its parent. If there is no parent specified the item will be displayed on the highest level.

 

You can refer to the following post that may be helpful to you:

Introduction: Power BI Gantt Chart with milestones - by Nova Silva

GanttPRO’s Task Hierarchy Feature

How to configure and launch Gantt Chart in Power BI - A Quick Guide (xviz.com)

 

Best Regards,

Neeko Tang

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

 

Thank you, @v-tangjie-msft !

It works almost.  I can't change the model since this is a direct query to the goals / scorecard dataset (the export to  pdx is not working currently -  I was in contact with the mS support re this yesterday ).

In the dataset from the PBI Service I get project name, id  and parent id as below.

community3.png

When I put parent id to the Parent field , I get the ID numbers instead of the project name.
community.png

Would it be possible to somehow display the parent ID name? 

Hi @Alisea_MI ,

 

According to your description ,here are my steps you can follow as a solution.

(1)This is my test data. 

vtangjiemsft_0-1666685938762.png

(2)We can create  a calculate column.

Parent_name = var _parent_id = 'Table'[Parent id]
var _t  =FILTER( 'Table' , 'Table'[id] = _parent_id)
return
IF(_parent_id=BLANK() , 'Table'[name], MAXX(_t, [name]))

(3)Put the calculate column  [Parent_name] to the Parent field.

 

Best Regards,

Neeko Tang

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

Thanx once again, @v-tangjie-msft !

The solutions seems to be right, but do I understand you correctly: it should be a calculated  column? This does not seem to be working in a measure.  Whe I try creating the same measure in your file, the formula gets the same error.

Alisea_MI_1-1666693655156.png

The main hinder here is probably that I have a direct query to the dataset, since I cannot download it right now and cannot create calculated columns.

Hi @Alisea_MI ,

 

Refer to this document, you can try creating a new calculate column.

Picture1.png

If the above does not help, you can mark the answer to this post as a solution and repost the post of how to show the id as name, thanks in advance.

 

Best Regards,

Neeko Tang

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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