Forum Discussion
combine data into one row
- 9 years ago
You can go to Query Editor, select both "Project Type" and "Service Type" columns, click "Group By" to have records group by all other columns and specify aggregation for these two columns. See my sample below:
Regards,
Hi Scott,
Thanks for the reply. While your solution would indeed work in the example I gave you, our real world data can contain many different Project/Service Type Description values, so Fill Down isn't alway a workable solution. Here are the rules I would like to apply the dataset through Power BI automatically, if possible.
1. If Task Name rows contain duplicate values, copy Project Type Description value where not null to Project Type Description where value is null. If both rows in the dataset contain null values, then keep it null.
(This should populate all of the null values in the Project Type Description column, unless the value is truely null)
2. Repeat step 1 for the Service Type Description column.
(This should get the dataset in the format you proposed and give me completely duplicate rows)
3. Remove duplicate rows
(This should give me one row of data for each Task Name)
Hope this makes sense.
You can go to Query Editor, select both "Project Type" and "Service Type" columns, click "Group By" to have records group by all other columns and specify aggregation for these two columns. See my sample below:
Regards,
- jcoe9 years agoFrequent Visitor
Thank you, Simon_Hou-MSFT!
Using the Group By feature did exactly what we were trying to accomplish. Thank you for your help!
- kymramosrpo3 years agoAdvocate V
What a neat, easy-to-follow solution! Thank you so much!