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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Remove the rest of the data after first occurence

I have concatenated few columns since my data was too great calculation wise, for which the DAX could not calculate as it was too complex, So I have to split the data into pieces and concatenate with & operator.

 

However the problem is that if there are more than 1 occurence for the same GPS location, the concatenated row shows data from both column. I am only interested in 1 of the column name to be present. 

So the question is, is there a way to remove any other occurence with starting name "Balise" after the first occurence. 

Example: if the data is as: "Balise: BRA2154vBalise: BY1154v"  it should be just "Balise: BRA2154v", so only 1 occurence is present at a time. 

 

balise.JPG

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Anonymous ,

 

You may try the custom column below.

List.First(List.Select(Record.ToList(Record.RemoveFields(_, {"Column1", "Column2"}, MissingField.Ignore)), each _ <> ""), 1)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-chuncz-msft 

 

Perhaps I did not mention, but the problem is not in power query. Cause if it was in the query, I could just use the function Power Bi provides already.

That is why using List.First will show in gray if used outside the Power query, as it is not m-script I believe.

 

Thank you for your effort 🙂

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors