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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors