Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Thundercoder
New Member

How to deal with list columns in PowerBI

Hi guys, 

 

My question is two fold- 


I have a dataset that consists of a list of employees and the revenue generated per shift.  Each shift a group of employees works and the store records the revenue.  

Say I have a text column in my dataset that consists of a list of names of the employees (Each row in the column would be a list such as cell a2 = Amy, Derek Wendy and cell a3 = Fiona, Wendy).   Does PowerBI have a list data type that can make sense of such a column?  How can I convert that column into a list data type and delimit it by ",".  

Also, once I do that how can I display a table grouped by the names of the people that were in the column and show their total revenue contribution or average revenue contribution per shift.   (for example if Wendy's name appeared in 3 rows, sum all of the revenue generated by Wendy's rows, or get the average revenue per shift she worked).

 

thanks! Let me know if I need to provide anymore details and if such is possible in powerbi 

1 ACCEPTED SOLUTION

Hi @Thundercoder ,

 

I am not sure why you want to convert the employee column into a list but you can use Text.Split to do that. I've attached a pbix with two options: Text.Split and splitting a column into several columns based on a delimeter.  You can see the steps when you go to Query Editor.

danextian_0-1663206476812.png

danextian_1-1663206482886.png

 

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

4 REPLIES 4
danextian
Super User
Super User

Hi @Thundercoder ,

 

There are a lot of data transformations you can do with Power BI. Some may not be drag and drop but are available using the M language. Text.Split might apply for your use-case but it can't be sure without seeing the data. Can you please post a sample data which we can easily manipulate (not an image)?

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523#M607150










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thanks so much for taking the time!  I posted a short example table below since it isnt letting me attach a file.   What I want to do is use powerbi to return a table of each employee and how much revenue each generated.     Perhaps I need to create a new query and build a new table based on the employees column and then create a relationship?   I just dont know how to go about doing this, thanks!

 

DateEmployeesShiftRevenue
2022-08-25 10:30Fiona, Wendy1400
2022-08-25 15:54Jim, Wendy, Tim2330
2022-08-26 10:52Fiona, Jim1360
2022-08-26 15:55Fiona, Tim, Colin2420
2022-08-27 10:40Wendy, Colin1385

 

Hi @Thundercoder ,

 

I am not sure why you want to convert the employee column into a list but you can use Text.Split to do that. I've attached a pbix with two options: Text.Split and splitting a column into several columns based on a delimeter.  You can see the steps when you go to Query Editor.

danextian_0-1663206476812.png

danextian_1-1663206482886.png

 

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi,

In the Query Editor, you can split the Employees column into rows.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.