Forum Discussion

murrayb8's avatar
murrayb8
Helper I
7 years ago
Solved

Stuck with Table Manipulation in Query Editor

Hi,

 

Im trying to change around a table in query editor in a specific way and cant quite get it right, hopefully someone can point me in the right direction.

 

So my table is all text and formatted in two columns like this:

 

Category   Entry

Cat1          entry1

Cat1          entry2

Cat1          entry3

Cat2          entry1

Cat2          entry2

Cat3          entry1

 

And essentially I want to end up with a table like this where categories become the column names:

 

Cat1      Cat2     Cat3

entry1   entry1   entry1

entry2   entry2   -----

entry3   ------    -----

 

the catch is that the categories will vary in name and quantity so I cant reference a column name in the M code and I need the entries in the column to just contain the unique values and then Nulls or some other placeholders.

 

Thanks in advance!