Matrix Table - Add Column to the end of the Matrix (not on every column)

bolwahnn

New Member
Joined
Apr 29, 2011
Messages
40
Hey Guys,
Looking for some help here - I havent been able to find a solution anywhere.

I have a matrix table that provides a view of aging inventory. For each client they have a number of days to work the ticket before it is outside of SLA. I want to add a column that shows when those tickets are outside of SLA. Currently when I try to add that data point, it shows up on every column, but I just want it to show at the end of the matrix (the last column).

Example: This is what I want to see.....
[TABLE="width: 500"]
<tbody>[TR]
[TD]Client:
[/TD]
[TD]0 Days[/TD]
[TD]1 Day[/TD]
[TD]2 Days[/TD]
[TD]3 days[/TD]
[TD]4 days[/TD]
[TD]5 days[/TD]
[TD]SLA # of Days[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]30 tickets[/TD]
[TD]20 tickets[/TD]
[TD]16 Tickets[/TD]
[TD]10 Tickets[/TD]
[TD]6 Tickets[/TD]
[TD]3 Tickets[/TD]
[TD]4 days[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]25 Tickets[/TD]
[TD]18 tickets[/TD]
[TD]12 tickets[/TD]
[TD]8 Tickets[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]2 days[/TD]
[/TR]
</tbody>[/TABLE]

Example: This is what I get currently get when trying to build the matrix (not what I want)
[TABLE="width: 500"]
<tbody>[TR]
[TD]Client[/TD]
[TD]0 Days[/TD]
[TD]SLA # of Days[/TD]
[TD]1 Day[/TD]
[TD]SLA # of Days[/TD]
[TD]2 Day[/TD]
[TD]SLA # of Days[/TD]
[TD]3 Days[/TD]
[TD]SLA # of Days[/TD]
[TD]4 Days[/TD]
[TD] SLA # of Days[/TD]
[TD]5 Days [/TD]
[TD]SLA # of Days[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]30 Tickets[/TD]
[TD]4 days[/TD]
[TD]20 tickets[/TD]
[TD]4 days[/TD]
[TD]16 Tickets[/TD]
[TD]4 days[/TD]
[TD]10 Tickets[/TD]
[TD]4 days[/TD]
[TD]6 Tickets[/TD]
[TD]4 days[/TD]
[TD]3 Tickets[/TD]
[TD]4 days[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]25 Tickets[/TD]
[TD]2 days[/TD]
[TD]18 Tickets[/TD]
[TD]2 days[/TD]
[TD]12 tickets[/TD]
[TD]2 days[/TD]
[TD]8 Tickets[/TD]
[TD]2 days[/TD]
[TD]0[/TD]
[TD]2 days[/TD]
[TD]0[/TD]
[TD]2 days[/TD]
[/TR]
</tbody>[/TABLE]

Does anyone know of a way to build the matrix as I'm intending it to look?

Thanks!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Can you provide a sample of your source data?
 
Upvote 0
Can you provide a sample of your source data?

I have 2 tables:
1) A custom date table that counts the aging starting with todays date as day 0, yesterday as day 1, day before yesterday Day 2, etc. etc.
2) Ticket data containing the: client Name, Ticket date opened, # of tickets, SLA threshold
So in the example provided the data would look like similar to this.....
[TABLE="width: 500"]
<tbody>[TR]
[TD]Client[/TD]
[TD]Ticket Date[/TD]
[TD]# of tickets[/TD]
[TD]SLA Threshold[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]9/24/2019[/TD]
[TD]30[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]9/23/2019[/TD]
[TD]20[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]9/22/2019[/TD]
[TD]16[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]9/21/2019[/TD]
[TD]10[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]9/20/2019[/TD]
[TD]6[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]9/19/2019[/TD]
[TD]3[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]9/24/2019[/TD]
[TD]25[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]9/23/2019[/TD]
[TD]18[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]9/22/2019[/TD]
[TD]12[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]9/21/2019[/TD]
[TD]8[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]

This is a stripped down version of the data, but if I could get assistance with how not to duplicate the "SLA Threshold" on every column, I can then apply it to the real data/matrix visual I'm trying to create.

Thanks!
 
Upvote 0
Hi,

Maybe this might suit, the dates in the first row will always show today's date minus 5 days, I added the array to populate a unique client list for the matrix sheet;

The index & match for SLA # of days will always pickup the first match value for that client.

Change sheet names and copy or drag these formulas as needed.


Book1
ABCD
1ClientTicket Date# of ticketsSLA Threshold
2A25/09/2019304
3A24/09/2019204
4A23/09/2019164
5A22/09/2019104
6A21/09/201964
7A20/09/201934
8B25/09/2019252
9B24/09/2019182
10B23/09/2019122
11B22/09/201982
Ticket Data



Book1
ABCDEFGH
125-09-1924-09-1923-09-1922-09-1921-09-1920-09-19
2Client:0 Days1 Day2 Days3 days4 days5 daysSLA # of Days
3A30 Tickets20 Tickets16 Tickets10 Tickets6 Tickets3 Tickets4
4B25 Tickets18 Tickets12 Tickets8 Tickets2
Matrix
Cell Formulas
RangeFormula
B1=TODAY()
B3=IFNA(INDEX('Ticket Data'!$C$2:$C$11,MATCH(Matrix!$A3&Matrix!B$1,INDEX('Ticket Data'!$A$2:$A$11&'Ticket Data'!$B$2:$B$11,),0))&" Tickets","")
C1=B1-1
H3=IF(A3="","",INDEX('Ticket Data'!$D$2:$D$11,MATCH(Matrix!$A3,'Ticket Data'!$A$2:$A$11,0)))
A3{=IFNA(INDEX('Ticket Data'!$A$2:$A$11,MATCH(0,COUNTIF(Matrix!$A$2:A2,'Ticket Data'!$A$2:$A$11),0)),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Looks to me like simple pivot operation. See if this works
Highlight your source range
Data ... From Table/Range ... [x] my table has headers
Change the text of the PowerQuery generated 2nd step to read {"Ticket Date", type date} instead of {"Ticket Date", type datetime} or {"Ticket Date", Int64.Type}
Click to select Ticket Date column then Transform...Pivot Column... and for value column, choose # of tickets

Code:
let  Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Client", type text}, {"Ticket Date", type date}, {"# of tickets", Int64.Type}, {"SLA Threshold", Int64.Type}}),
#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Changed Type", {{"Ticket Date", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(#"Sorted Rows", {{"Ticket Date", type text}}, "en-US")[#"Ticket Date"]), "Ticket Date", "# of tickets", List.Sum)
in #"Pivoted Column"


Fancy version that rearranges columns and sets neutral column headers

Code:
let  Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Client", type text}, {"Ticket Date", type date}, {"# of tickets", Int64.Type}, {"SLA Threshold", Int64.Type}}),
#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Changed Type", {{"Ticket Date", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(#"Changed Type", {{"Ticket Date", type text}}, "en-US")[#"Ticket Date"]), "Ticket Date", "# of tickets", List.Sum),
#"Demoted Headers" = Table.DemoteHeaders(#"Pivoted Column"),
#"Renamed Columns" = Table.RenameColumns(#"Demoted Headers",{{"Column1", "Client"}, {"Column2", "SLA Threshold"}, {"Column3", "0 Days"}, {"Column4", "1 Day"}, {"Column5", "2 Day"}, {"Column6", "3 Day"}, {"Column7", "4 Day"}, {"Column8", "5 Day"}}),
#"Reordered Columns" = Table.ReorderColumns(#"Renamed Columns",{"Client", "0 Days", "1 Day", "2 Day", "3 Day", "4 Day", "5 Day", "SLA Threshold"}),
#"Removed Top Rows" = Table.Skip(#"Reordered Columns",1)
in  #"Removed Top Rows"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top