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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
nlakshmi
Frequent Visitor

PBI Matrix

 

Hi,

 

I have a database table with the below fields:

ID Field
Delay Reason 1
Delay Reason 2
Delay Reason 3

 

Delay Reason 1, 2 and 3 fields are like flag fields - i.e. for every ID Field, there could be a value in the only one of the Delay Reason fields like below:

ID FieldDelay Reason 1Delay Reason 2Delay Reason 3
1Damaged  
2 Being Repaired 

 

I want to build a matrix in PowerBI like below, which is all the Delay Reasons as rows and the total count for each Reason.

 

Delay ReasonTotal
Damaged1
Being Repaired1

 

But, when I pull in the Delay Reason 2 after starting with the Delay Reason 1, the Delay Reason 2 becomes a sub type of Delay Reason 1 with an expand/collapse option. I instead want it to show below Delay Reason 1.

 

Is there a way to achieve this?

1 ACCEPTED SOLUTION
ppm1
Solution Sage
Solution Sage

In the query editor, select your ID Field column, right click and choose "unpivot other columns". You can then delete the columns with the previous column name values (Attribute), and rename the other one (Value) to "Delay Reason". If needed, filter out any null/blank values and you can then make your visual.

 

Pat

Microsoft Employee

View solution in original post

2 REPLIES 2
ppm1
Solution Sage
Solution Sage

In the query editor, select your ID Field column, right click and choose "unpivot other columns". You can then delete the columns with the previous column name values (Attribute), and rename the other one (Value) to "Delay Reason". If needed, filter out any null/blank values and you can then make your visual.

 

Pat

Microsoft Employee
nlakshmi
Frequent Visitor

Thank you very much!  That worked.

But, one issue though is that the counts are now the same for all the delay reason codes. 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.