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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
sumanth_v
New Member

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

 

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
New Member

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

 

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

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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors