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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
mzutshi
Frequent Visitor

Power BI Static rows in Matrix Visual

I have created below matrix using a table having tickets data with fields as Resolution Breached Final and Priority . Resolution Breached Final contains two values as "SLA Met" and " Breached" and Priority has"P1","P2","P3" AND "P4".  Percentage below the priorities is a matrix which calculates % of total tickets meeting SLA/ Total number of tickets

 

 

mzutshi_1-1714668804779.png

 

I Need to have static rows above Breached row in the above matrix ,which contains below data. ESL and MSl data will not change.

mzutshi_2-1714669069322.png

 

How do i achieve this ?

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @mzutshi ,

We can create a new table for the rows of the matrix like this.

vcgaomsft_0-1714715126841.png

You can refer to M-code like this:

let
    Source = Table.FromList(List.Distinct(Table[Resolution Breached Final]) & {"ESL","MSL"}, null, {"Resolution Breached Final"}),
    #"Added Conditional Column" = Table.AddColumn(Source, "Sort", each if [Resolution Breached Final] = "ESL" then 0 else if [Resolution Breached Final] = "MSL" then 1 else if [Resolution Breached Final] = "Breached" then 2 else if [Resolution Breached Final] = "SLA Met" then 3 else null)
in
    #"Added Conditional Column"

And the relationships:

vcgaomsft_1-1714715290256.png

Then please create a new measure.

NewMeasure = 
VAR __cur_row = SELECTEDVALUE('Table2'[Resolution Breached Final])
VAR __cur_col = SELECTEDVALUE('Table'[Priority])
VAR __result = 
SWITCH(
    TRUE(),
    // [Measure] is the value field of the original matrix
    __cur_row IN {"Breached","SLA Met"},CALCULATE( [Measure], 'Table'[Resolution Breached Final]=__cur_row ),
    __cur_row = "ESL", SWITCH( __cur_col, "P1", 1, "P2", 0.92, "P3", 0.96, "P4", 0.99),
    __cur_row = "MSL", SWITCH( __cur_col, "P1", 0.9, "P2", 0.9, "P3", 0.92, "P4", 0.95)
)
RETURN
__result

Output:

vcgaomsft_2-1714715410984.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

View solution in original post

2 REPLIES 2
mzutshi
Frequent Visitor

Thank you so much @Anonymous 

Anonymous
Not applicable

Hi @mzutshi ,

We can create a new table for the rows of the matrix like this.

vcgaomsft_0-1714715126841.png

You can refer to M-code like this:

let
    Source = Table.FromList(List.Distinct(Table[Resolution Breached Final]) & {"ESL","MSL"}, null, {"Resolution Breached Final"}),
    #"Added Conditional Column" = Table.AddColumn(Source, "Sort", each if [Resolution Breached Final] = "ESL" then 0 else if [Resolution Breached Final] = "MSL" then 1 else if [Resolution Breached Final] = "Breached" then 2 else if [Resolution Breached Final] = "SLA Met" then 3 else null)
in
    #"Added Conditional Column"

And the relationships:

vcgaomsft_1-1714715290256.png

Then please create a new measure.

NewMeasure = 
VAR __cur_row = SELECTEDVALUE('Table2'[Resolution Breached Final])
VAR __cur_col = SELECTEDVALUE('Table'[Priority])
VAR __result = 
SWITCH(
    TRUE(),
    // [Measure] is the value field of the original matrix
    __cur_row IN {"Breached","SLA Met"},CALCULATE( [Measure], 'Table'[Resolution Breached Final]=__cur_row ),
    __cur_row = "ESL", SWITCH( __cur_col, "P1", 1, "P2", 0.92, "P3", 0.96, "P4", 0.99),
    __cur_row = "MSL", SWITCH( __cur_col, "P1", 0.9, "P2", 0.9, "P3", 0.92, "P4", 0.95)
)
RETURN
__result

Output:

vcgaomsft_2-1714715410984.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.