Forum Discussion
Need Help on a table
- 1 year ago
Hi Theeshk93
In the query editor, you can unpivot all columns and then remove blank rows from the resulting value column and then add an index or order column for each unique department per manager either with DAX or M. You can use this order column to create a kind of invisible key so provide a row context for each department per manager so all
Please refer to the attached pbix for the details.
Hey Theeshk93 ,
Thanks for sharing the screenshot and your problem context. You're trying to create a matrix-style table visual in Power BI (or similar), where each manager’s name is a column header and their departments are listed below but you're seeing blank rows above the departments, especially under John and Louis.
Solutions
Option 1: Create Separate Tables for Each Manager
To avoid blank rows:
Use measures or calculated tables to filter the departments per manager:
Ben_Departments = FILTER('DepartmentTable', 'DepartmentTable'[Manager] = "Ben")Then create a table visual per manager or concatenate them using UNION and add a [Manager] column to make one clean table.
Option 2: Create a Custom Table Visual
If you want a side-by-side table like your image:
Create this shape manually in Power BI using:
FinalDisplayTable = DATATABLE( "Ben", STRING, "John", STRING, "Louis", STRING, { {"IT", BLANK(), BLANK()}, {"Finance", BLANK(), BLANK()}, {BLANK(), "Womens", BLANK()}, {BLANK(), "Procurement", BLANK()}, {BLANK(), BLANK(), "Sales"}, {BLANK(), BLANK(), "Finance"} } )
You can build this DATATABLE using Power Query transformations as well, such as pivoting and filling blank rows upward.
For Detailed Information:
Microsoft Docs – Matrix Visual
If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam