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.
Hello community
I'm trying to create new columns in a table from the values in one column in the table.
I have a data set as it is shown below:
And I want to get new columns from the values as it is shown in red.
I wish to do it automatically.
How can I do that?
Thanks in advance for your time
Solved! Go to Solution.
In the Query Editor (M), you can select Column1 and choose "Pivot Column" on the Transform tab.
Maybe that is what you are looking for, however your result columns are empty and COLUMN1 is still in the result tabel.
"Pivot Column" typically aggregates values from another column (e.g. COLUMN2) in the new columns per value in COLUMN1, and then reduce rows so there are no duplicate combinations in the other columns (COLUMN3 and COLUMN4) in your example.
COLUMN1 as such would not be in the result table.
Edit: alternatively you can use the following code in the Advanced Query Editor, in which "TableName" is the name of the previous step:
AddedColumns = Table.SelectColumns(TableName,List.Union({Table.ColumnNames(TableName),List.Distinct(TableName[COLUMN1])}), MissingField.UseNull)
In the Query Editor (M), you can select Column1 and choose "Pivot Column" on the Transform tab.
Maybe that is what you are looking for, however your result columns are empty and COLUMN1 is still in the result tabel.
"Pivot Column" typically aggregates values from another column (e.g. COLUMN2) in the new columns per value in COLUMN1, and then reduce rows so there are no duplicate combinations in the other columns (COLUMN3 and COLUMN4) in your example.
COLUMN1 as such would not be in the result table.
Edit: alternatively you can use the following code in the Advanced Query Editor, in which "TableName" is the name of the previous step:
AddedColumns = Table.SelectColumns(TableName,List.Union({Table.ColumnNames(TableName),List.Distinct(TableName[COLUMN1])}), MissingField.UseNull)
I have to bind values to slicer based on value selection in another slicer. For achieving this I am getting data from different table but if i choose value in slicer that is not reflecting in all the visuals of report.
@Deepa that looks like something completely different, so why not just start a new topic?
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 |
---|---|
114 | |
101 | |
78 | |
75 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |