Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I followed this tutorial to create a Parent-Child hierarchy on Power BI using MS Project data, but I ended up with blank lines and I can't filter them otherwise it'll hide multiple tasks. In the end of that tutorial they teach how to hide them, but their data is different from mine. Instead of "amount", I have the columns: start, finish, delay and % completed, I think that's why I can't solve the blank space problem with their solution.
Any ideas on what I should do? I'm new on Power BI and I've been searching about it for days..
Hi @Anonymous ,
There must be two columns [Employee] and [Manager] in your table. Then you can use PATH function to get hierachy level.
Path = PATH(Employee[EmployeeId], Employee[ManagerId])
My Sample:
Then use PATHITEM to catch value in each level.
Level 1 = PATHITEM(Employee[Path], 1, 1)
Level 2 = PATHITEM(Employee[Path], 2, 1)
...
Due to there are blank values in your levels, I think you will get result in blank level.
Try this code.
Measure =
IF(ISINSCOPE(Employee[Level 4]) = BLANK(),SUM(Employee[Index]),
IF(ISINSCOPE(Employee[Level 3]) = BLANK(),SUM(Employee[Index]),
IF(ISINSCOPE(Employee[Level 2]) = BLANK(),SUM(Employee[Index]),
IF(ISINSCOPE(Employee[Level 1]) = BLANK(),IF(ISBLANK(MAX(Employee[Level 2])),BLANK(), SUM(Employee[Index])),BLANK()))))
Result is as below. Left one is like yours and right one is the result based on measure.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi!!
My data doesn't have blank values. The column values that apears on the blank rows are from the parent task. I highlighted in the photo below where the data is and pointed to where it should be.
User | Count |
---|---|
5 | |
5 | |
3 | |
2 | |
2 |
User | Count |
---|---|
10 | |
7 | |
4 | |
4 | |
4 |