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.
Hi,
I have data that looks like this:
CompanyID | OfficeAddressID | MeetingAddressID | ShopAddressID |
1 | 1 | 6 | null |
2 | null | 4 | null |
3 | 7 | 2 | 12 |
4 | null | null | 3 |
5 | 8 | 9 | 15 |
I would like it to look like this:
CompanyID | AddressID | AddressType |
1 | 1 | Office |
1 | 6 | Meeting |
2 | 4 | Meeting |
3 | 7 | Office |
3 | 2 | Meeting |
3 | 12 | Shop |
4 | 3 | Shop |
5 | 8 | Office |
5 | 9 | Meeting |
5 | 15 | Shop |
Basically, I want to turn each company's address IDs into separate records.
Anyone know how to do this within Query Editor?
Thanks!
Solved! Go to Solution.
Hi @bullius,
Select all the columns except the Company ID and do Unpivot columns the result will be as show below:
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @bullius,
Select all the columns except the Company ID and do Unpivot columns the result will be as show below:
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering 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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |