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
Dunner2020
Post Prodigy
Post Prodigy

Spliting a row into two rows based on column value

 

 

Hi there,

 

I have a dimension table that has a 1:M relationship with the fact table as shown in the following picture:

 

leo_89_1-1627427456148.png

 

In the fact table, ContributingFactor may contain multiple values as shown in the following picture (red lines show multiple values in a single cell, values are separated by a tab).

 

leo_89_2-1627427549565.png

 

The problem is that when I use the dimension table (contributingfactor) as a slicer, and select value from it. It only shows the record of fact table where contributingfactor value appears itself. For example, as shown in the picture below:

leo_89_3-1627427575671.png

In the above picture, it only shows those records of work method when ‘work method’ appears alone in the fact table. It does not show those values when ‘work method’ appears with other values. For example, it did not show a record when contributing factor value in the fact table is ‘work method’ and ‘Service provider -availability’.

 

I was wondering that is there any way in the power query that we split the one row into two rows if contributingfactor column has multiple values. Each row represents the single value of contributingfactor

 

Sample file here

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Dunner2020 

 

Please refer to this article: Split by Delimiter into Rows (and Columns) with Power Query

Under Home tab, select Split Column > By Delimiter.

073005.jpg

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Dunner2020 

 

Please refer to this article: Split by Delimiter into Rows (and Columns) with Power Query

Under Home tab, select Split Column > By Delimiter.

073005.jpg

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

lbendlin
Super User
Super User

You can deconstruct the rows in Power Query.  Use Character.FromNumber(9) to find the tabs (or let the Power Query editor do it for you).

 

Please provide sample data in usable format (not as a picture) if you want sample Power Query Code.

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.