The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Dear Helpers,
I had to change the Type of all columns but the first one with an unknown number of columns and solved it with the following code:
#"Übrige Spalten in Zahlen formatieren" = Table.TransformColumnTypes(
#"Werte ersetzt",
List.Transform(
List.RemoveFirstN(
Table.ColumnNames(#"Werte ersetzt"),
1
),
each {_,type number}
)
)
Now I have to replace "." by "," in all columns but the first column and tried it with the following code:
#"Werte ersetzt" = Table.ReplaceValue(
#"Datumsspalte umbenennen",
".",
",",
Replacer.ReplaceText,
List.Transform(
List.RemoveFirstN(
Table.ColumnNames(#"Datumsspalte umbenennen"),
1
)
)
),
However, I only receive an Error that I have to input 2 arguments and only input 1. Can you help me?
BR
Manuel
Hi @Manuel123
In Power Query , use “Shift” to choose all the columns except the first one , then right click to select Replace Values to replace “.” by “,” .With “Shift” , you only need to select the first column and the last column, all the columns will be included in it .
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Manuel123 , Have you tried right click on the column and replace. That will generate correct code
Dear @amitchandak ,
sure, however I only see the code for one column. The file will always have an unkown number of columns, thus I wanted to replace the column name by a code that says: Replace in each column but the first one.
BR
Manuel
User | Count |
---|---|
82 | |
80 | |
35 | |
32 | |
32 |
User | Count |
---|---|
93 | |
79 | |
62 | |
54 | |
51 |