This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
how can I get the column name of a table and after that use as a parameter?
Solved! Go to Solution.
Hi,
The important step is:
#"Columns" = Table.ColumnNames(#"Changed Type")
This is the M code of the example.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i44FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"Column4", type text}}),
#"Columns" = Table.ColumnNames(#"Changed Type")
in
#"Columns"Regards.
Hi @henriquelima,
You can use Table.ColumnNames in your M code, like this:
Next, create a new parameter and select Query option in Suggested Values. In Query field you will find your table.
Regards.
Please can you send me the full code of advanced editor to extract the column name? Just have a half picture
Hi,
The important step is:
#"Columns" = Table.ColumnNames(#"Changed Type")
This is the M code of the example.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i44FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"Column4", type text}}),
#"Columns" = Table.ColumnNames(#"Changed Type")
in
#"Columns"Regards.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 28 | |
| 23 | |
| 22 | |
| 16 | |
| 16 |
| User | Count |
|---|---|
| 60 | |
| 35 | |
| 28 | |
| 22 | |
| 21 |