Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a table with an index column [Index] as a unique identifier, an [Attribute] column which holds whether the [Result] is the category name or category result (the only two values in this column are 'Cat' and 'Result'), a [Value] column which holds either the category name or category result.
In order to split [Attribute] into two columns called [Category] and [Result] I have added a second index [Index1] starting from 0 and then performed the following query:
= Table.Pivot(Index, List.Distinct(Index1[Attribute]), "Attribute", "Value", List.Min)
But it's telling me that the name 'Index1' isnt recognised. Am I doing something wrong?
Solved! Go to Solution.
I couldn't seem to apply the pivot I wanted from the interface. In the end I renamed my 'Key' index to [KEY] and reverted my pivot query to look at just [Index] and it worked. I have no idea why, but it did.
Suggest using the interface ( from Transform menu) to do the pivot.
The code is passing the wrong parameters - Index1[Attribute] is not a list, Index is probably not a table.
At least try to do the Pivot from the interface and compare / contrast with the code written.
I couldn't seem to apply the pivot I wanted from the interface. In the end I renamed my 'Key' index to [KEY] and reverted my pivot query to look at just [Index] and it worked. I have no idea why, but it did.
Did you write the line yourself or use the interface to produce it?
@HotChilli I wrote it myself, someone gave it to me and it worked before I had another Index column as a unique identifier. Now, it seems upset that I changed it to Index1
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
98 | |
75 | |
63 | |
62 |
User | Count |
---|---|
135 | |
105 | |
104 | |
80 | |
65 |