Forum Discussion
Separating out values in power query based on same unique identifer
- 2 years ago
Ok. So, the very simplest way to solve your exact issue is to create a column that has your new column headers in it, then pivot that column:
// New custom column 'ColumnHeaders' if [displayValue] = "Cool" then "DisplayValue1" else "DisplayValue2"Pivot column:
Output:
Obviously this is largely dependent on how many actual DisplayValues you have per MemberID, and how frequently the values change.
Pete
Hi BA_Pete,
Thanks for the reply.
This data will be displayed in a table format. The data is being imported from a web api that is seperating the recrod based on the import method but these fields (cool and not cool) are actually unrelated and should be attached to the same record. I will need to do the same thing for multiple fields from the import. If I understand how to munipulate this one thes rest should fall into line.
Ok. So, the very simplest way to solve your exact issue is to create a column that has your new column headers in it, then pivot that column:
// New custom column 'ColumnHeaders'
if [displayValue] = "Cool" then "DisplayValue1"
else "DisplayValue2"
Pivot column:
Output:
Obviously this is largely dependent on how many actual DisplayValues you have per MemberID, and how frequently the values change.
Pete