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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
francisthe63
Regular Visitor

ExpandRecordColumn only where a specific item

Hello,

 

I have a problem in Power Query

 

I have a table with Record column but want record this column only with specific item in the Record column

 

I need to do this because when made only ExpandRecordColumn, a lot of rows that don't interesting me appears (i want only rows with specific item) and the performance of my query is affected because i filter this item after record column. I want to filter this item when recording to have a performance. 

 

Do you know if it's possible ? 

 

Thank you in advance 

2 REPLIES 2
AnushaSri
Advocate II
Advocate II

1. Add a new column by converting Record column to a table column.

2. Add another column to apply filtering with in the table before expand.

3. Remove actual record column and NewColumnName column.

4.Expand FilteredRecordColumn for required columns.

= Table.AddColumn( Source, "NewColumnName", each Record.ToTable([RecordColumn]))
= Table.AddColumn( Custom1, "FilteredRecordColumn", each Table.SelectRows([NewColumnName],each [id] ="9"))
= Table.RemoveColumns(Custom2,{"Record Column", "NewColumnName"})

Please Accept as a solution if it resolves your issue.

Have a nice day 🙂 

dufoq3
Super User
Super User

Hi, you can choose what exactly you want to expand. If you need something more, provide sample data in usable format (not a screenshot) and expected result based on sample data please.

 

dufoq3_0-1712062061670.png

 


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors
Top Kudoed Authors