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 Everyone,
Is there any way to merge two rows which having nulls and data in both rows
for ex:
rows looks like this
code name yr values code name lastyr lastyrvalues
xyz abc 2018 123 null null null null
null null null null xyz abc 2017 345
I want to merge those two columns into one single column and the final row I'm looking for is
code name yr values code name lastyr lastyrvalues
xyz abc 2018 123 xyz abc 2017 345
Is there any way to get the result like this in Power BI Query Edit Window I tried with transposing entire table and merging two columns with a delimiter and pivoting and unpoviting but didn't get exact outcome what I'm looking for.
any help is appreciated.
Thanks
Solved! Go to Solution.
Hi @kkg1991,
Based on my test, you can refer to below steps in Query Editor:
1.Use the “Transpose” function to transpose your data.
2.Use the “Custom Column” function to merge the Column2 and the Column3.
Custom=[Column2]&[Column3]
3.Remove the Column2 and the Column3.
4.Transpose your data again and use the "Use First Row as Headers" function to set your headers. Now you can get the result.
You can also download the PBIX file to have a view.
Regards,
Daniel He
Hi @kkg1991,
Based on my test, you can refer to below steps in Query Editor:
1.Use the “Transpose” function to transpose your data.
2.Use the “Custom Column” function to merge the Column2 and the Column3.
Custom=[Column2]&[Column3]
3.Remove the Column2 and the Column3.
4.Transpose your data again and use the "Use First Row as Headers" function to set your headers. Now you can get the result.
You can also download the PBIX file to have a view.
Regards,
Daniel He
Thanks Daniel for your help.
Could you please tell me if your problem has been solved? If it is, could you please mark the helpful reply as Answered?
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 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |