Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello, Somebody can help me !
I have a database and i want to transpose some informations, Line to colunm. But is not a normal way.
My base is:
Modelo 1
I need to keep the columns: Data, praza, numero_domicilio and tvdomicilio. Parallel i need to transpose the id_parametro and conteudo_parametro. Like this:
Who can help me do this automatically in Power BI?
Thanks!
Solved! Go to Solution.
I think what you want to do is select your ID Parametro column, go to the Transform ribbon, and select Pivot Column. Select the conteudo_parametro as the data value, and then in advanced options, select Don't Aggregate. It would look like this:
It turned this:
into this:
Here is the M code I used if you want to look at it:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("jcrJDcAgDETRXnxGwjZkoYCErBUg+m8j4zSAL/4j+bVGEiUqq1AgEbabplzQf5cyIxv1MJYLsrvkilSXtHmMpTJbTpe0x+WSitwumZDHJTPyUu8f", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, Code1 = _t, Code2 = _t, Code3 = _t, Data1 = _t, Data2 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Data1", Int64.Type}}),
#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Changed Type", {{"Data1", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(#"Changed Type", {{"Data1", type text}}, "en-US")[Data1]), "Data1", "Data2")
in
#"Pivoted Column"
How to use M code provided in a blank query:
1) In Power Query, select New Source, then Blank Query
2) On the Home ribbon, select "Advanced Editor" button
3) Remove everything you see, then paste the M code I've given you in that box.
4) Press Done
5) See this article if you need help using this M code in your model.
If you need more help, please provide us usable data. We cannot work with screenshots for source data, and I'm not keying that in. I just keyed in some random data in Excel.
How to get good help fast. Help us help you.
How To Ask A Technical Question If you Really Want An Answer
How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingI think what you want to do is select your ID Parametro column, go to the Transform ribbon, and select Pivot Column. Select the conteudo_parametro as the data value, and then in advanced options, select Don't Aggregate. It would look like this:
It turned this:
into this:
Here is the M code I used if you want to look at it:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("jcrJDcAgDETRXnxGwjZkoYCErBUg+m8j4zSAL/4j+bVGEiUqq1AgEbabplzQf5cyIxv1MJYLsrvkilSXtHmMpTJbTpe0x+WSitwumZDHJTPyUu8f", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, Code1 = _t, Code2 = _t, Code3 = _t, Data1 = _t, Data2 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Data1", Int64.Type}}),
#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Changed Type", {{"Data1", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(#"Changed Type", {{"Data1", type text}}, "en-US")[Data1]), "Data1", "Data2")
in
#"Pivoted Column"
How to use M code provided in a blank query:
1) In Power Query, select New Source, then Blank Query
2) On the Home ribbon, select "Advanced Editor" button
3) Remove everything you see, then paste the M code I've given you in that box.
4) Press Done
5) See this article if you need help using this M code in your model.
If you need more help, please provide us usable data. We cannot work with screenshots for source data, and I'm not keying that in. I just keyed in some random data in Excel.
How to get good help fast. Help us help you.
How To Ask A Technical Question If you Really Want An Answer
How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThank you !! have a nice week!
If that helps you @Anonymous please mark my post as the solution so this thread can be closed and others can see it is solved as well.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingShare feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.