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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
sumanth_v
Regular Visitor

How to Separate a column (, as delimiter) and add numerical value to each Individual Value

Hello BI Community,

 

I have this requirement for my project that I am working on, where i need to calculate hours of each instructor separately. But the problem is some classes are taught by multiple instructors. Below are the details of the data and the problem.

 

My Data looks like - 

sumanth_v_0-1718684736608.png

 

Problem - If you take 1st row as example, I need to calculate the Hours taught by instructor by class duration, where Abby =3 and John =3. Because they both taught the class together.

 

My final data should look like -

sumanth_v_1-1718684946764.png

How to achieve this in power bi. Any help would be appreciated.

 

Thanks

1 ACCEPTED SOLUTION

Hi @sumanth_v 

Once you want to perform analysis at the instructor level, the class ID can no longer be unique at the table level.

This is not a tool issue, but rather a data modeling and logic issue.

The best practice for working with Power BI is to use a star schema.

This consists of a fact table with events/orders/transactions, etc.,

And dimension (lookup) tables that detail these transactions.

In your case, this would be an instructor table and a course table.

The large table will contain duplicates, while the small tables will be one-to-one.

Ritaf1983_0-1718687876341.png

Ritaf1983_1-1718688059301.png

 

more information about the modeling here :
https://www.datacamp.com/tutorial/data-modeling-in-power-bi-tutorial

The updated pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

6 REPLIES 6
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Screenshot_1.png

sumanth_v
Regular Visitor

Thanks for your reply, But that would create duplicate values right, In my case Class ID should be unique. Do you have any other solution.

Hi @sumanth_v 

Once you want to perform analysis at the instructor level, the class ID can no longer be unique at the table level.

This is not a tool issue, but rather a data modeling and logic issue.

The best practice for working with Power BI is to use a star schema.

This consists of a fact table with events/orders/transactions, etc.,

And dimension (lookup) tables that detail these transactions.

In your case, this would be an instructor table and a course table.

The large table will contain duplicates, while the small tables will be one-to-one.

Ritaf1983_0-1718687876341.png

Ritaf1983_1-1718688059301.png

 

more information about the modeling here :
https://www.datacamp.com/tutorial/data-modeling-in-power-bi-tutorial

The updated pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

I accepted your comment as a solution, Is there a way to follow you in linkedIn?

@sumanth_v 
Happy to help, and yes of course.
linkedin : https://www.linkedin.com/in/rita-fainshtein/

Blog : Rita Fainshtein | Profile (madeiradata.com)

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ritaf1983
Super User
Super User

Hi @sumanth_v 
You can split the column of instructors names to rows with PQ :

Ritaf1983_0-1718685788308.png

Result :

Ritaf1983_1-1718685823354.png

pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors