Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am not so familiar with M lang, and am straggling to solve the following problem in Power Query:
I have the table
TABLE1
Date | Attribute | Value |
2023-02-01 | AA | A1 |
2023-02-01 | AA | A2 |
2023-02-01 | BB | B1 |
2023-02-02 | AA | A3 |
2023-02-03 | BB | B2 |
2023-02-03 | BB | B3 |
2023-02-04 | CC | C1 |
2023-02-06 | AA | A4 |
I need to combine (with ";" as separator) values in cells indicated above in italic so the only one row exist for every Date/Attribute combination.
In other words, the desired table should looks like this:
Date | Attribute | Value |
2023-02-01 | AA | A1; A2 |
2023-02-01 | BB | B1 |
2023-02-02 | AA | A3 |
2023-02-03 | BB | B2; B3 |
2023-02-04 | CC | C1 |
2023-02-06 | AA | A4 |
Please help!
Solved! Go to Solution.
Hi,
You have to group by
then add a custom column
Table.ToList( Table.RemoveColumns([Count],{"Date", "Attribute"}))
then extract values
select your delimiter
and remove column count
If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution!
Thank you very much, @serpiva64 !!!
It turns much easier then I've tried to code with nested M functions.
Thanks once again for very helpful reply.
Hi,
You have to group by
then add a custom column
Table.ToList( Table.RemoveColumns([Count],{"Date", "Attribute"}))
then extract values
select your delimiter
and remove column count
If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
8 | |
7 | |
6 |