Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hello all,
I would like have a custom function able to change column type to percentage only if the column header has "%" inside.
I know the function to use is Table.TransformColumnTypes. I made this:
Changed_Type1 = Table.TransformColumnTypes(
Table_to_Change,
{{ List.Select (Table.ColumnNames (Table_to_Change), each Text.Contains (_, "%"),
Percentage.Type}})
The point is that List.Select (Table.ColumnNames (Table_to_Change), each Text.Contains (_, "%") return a list, while there I need to have text.
How to do this?
Thanks.
Solved! Go to Solution.
Changed_Type1 = Table.TransformColumnTypes(
Table_to_Change,
List.Transform(List.Select(Table.ColumnNames(Table_to_Change), each Text.Contains(_, "%")), each {_, Percentage.Type})
)
Changed_Type1 = Table.TransformColumnTypes(
Table_to_Change,
List.Transform(List.Select(Table.ColumnNames(Table_to_Change), each Text.Contains(_, "%")), each {_, Percentage.Type})
)
Thanks AlienSx
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 11 | |
| 9 | |
| 8 | |
| 6 |