How to create a text based Crosstab (pivot) in Excel?

0

Suppose I have a list of issues that have the following:

  • Priority: 1-5 (how urgent something is)
  • Impact: 1-5 (how many people will be affected by the problem)
  • Desc: 15 chars (a very short description)

What I would like to see is this:

            impact              1             2              3            ...
priority
    1                     network fail                     password blocked
    2                     badge issue
    3                                     toolbar hidden
    ...

The only things I have seen on the web are very limited examples that do not appear to be able to cope with the display of different text

Is it possible to do this easily or would it require more complex VBA?

In the event of multiple values appearing in one CELL it should just append ","

EDIT:

Sample input data
Description             Impact             Priority
network fail              1                    1
toolbar hidden            2                    3
password blocked          3                    1
...

adolf garlic

Posted 2018-06-26T07:28:21.600

Reputation: 1 618

Show us a sample of your data – PeterH – 2018-06-26T07:38:54.963

well I've shown the schema (the 3 fields) and you can see the desired output so... – adolf garlic – 2018-06-26T09:07:07.487

soooo.. what is the data looking like originally ? 3 columns individual columns ? do they have headers ?? I cant even attempt to create the output without seeing the input – PeterH – 2018-06-26T09:45:17.673

priority can be a value from 1 to 5, impact can be a value from one to five and description can be 15 characters long – adolf garlic – 2018-06-26T11:28:20.893

Answers

0

see my answer on Stackoverflow concerning the same kind of problem.
Since you use Excel 2013, you will have to install the free MS Add-in Power Query*

Follow these steps:

  • Import your data in Power Query (define your Inputs as table)
    Go to Data > Get & Transform > From Table (Excel 2016) or Power Query > Excel Data > From Table (Excel 2013 & 2010)
  • Select the column Impact
    • on the ribbon Transform, choose Pivot column
      • Values Column = Description
      • Aggregate Value Function = no Aggregation
  • Click Close & Load from the Home tab

The M-Code is this one

let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Description", type text}, {"Impact", Int64.Type}, {"Priority", Int64.Type}}),
    #"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Changed Type", {{"Impact", type text}}, "de-CH"), List.Distinct(Table.TransformColumnTypes(#"Changed Type", {{"Impact", type text}}, "de-CH")[Impact]), "Impact", "Description")
in
    #"Pivoted Column"

.* from MS Office 2016, it's fully integrated in Excel as Get & Transform function.

visu-l

Posted 2018-06-26T07:28:21.600

Reputation: 426

seems like it can only support one value per result cell? that's not exactly what I was after - there could be multiple values per cell, it should show all of them – adolf garlic – 2018-07-04T08:40:06.693