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.
Hi,
I've got a text column with this format "Oper A - 8.5, Oper B - 3.0, Oper A - 2.5, Oper C - 5.0, Oper B - 5.0" to define the operations that happened in 24 hours. Basically time is separated by " - " from the operation code and each entry is separated by commas.
What I would like to have at the end is "Oper A - 11.0, Oper B - 8.0, Oper C - 5.0", meaning I would like to group the operation codes and sum their hours.
Anybody could suggest any approach to this? Thanks!
Solved! Go to Solution.
Hi @Anonymous
You can split those into their own rows using the same split function. Just click the advanced option in the Split dialog and set something like this for your column.
Hi @Anonymous
First of all, try splitting the column into two columns. I suggest doing this in the Query Editor.
Then group them in the Query Editor. This should give you the output you are after.
Thank you for your reply Phil,
That part is easy, but the data I've got is a bit more complex. As I mention in my original post, there're several codes in the same text column, separated by commas, so splitting the columns will result in a variable number of extra columns. To get more context, see the screenshot of the column I'm taking about.
The number of codes could be different per row, and the times too.
Thank you!
Hi @Anonymous
You can split those into their own rows using the same split function. Just click the advanced option in the Split dialog and set something like this for your column.
Thank you @Phil_Seamark,
I think I had in my mind an easiest way to calculate "on-the-fly" (without creating extra columns) the values after the commas and group them by the operation codes. I'll try the splitting instead. Thank you again for your help!
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 |
---|---|
76 | |
73 | |
57 | |
38 | |
35 |
User | Count |
---|---|
83 | |
68 | |
59 | |
46 | |
45 |