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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
atin
Resolver I
Resolver I

Removing brackets and numbers included in brackets

Remove numbers & bracketsRemove numbers & brackets

Hi All

Please can you tell me how to remove the numbers that are embedded in a bracket including the brackets as well 

e.g Looking at a country & its population, the data set has the following numbers 

  1.  India 1,040,000,000[1]
  2. Cyprus 835,000[9]
  3. Madagascar 18,606,000[3]

how do I remove these numbers including the brackets in power bi, whilst not using R

 

I am only interested in the population numbers.

 

Many thanks 

 

 

1 ACCEPTED SOLUTION
ammcleod
Frequent Visitor

Hi @atin ,

In the Query Editor, you could highlight the column "Population 2000 estimate" and Split the Column by Delimiter. Make the Delimiter "[" and the column should be split by the start of the Bracket. 

 

From there you can go ahead and delete the second column that holds the rest of the Bracket and the number inside. 

 

Let me know if this works for you! 

View solution in original post

3 REPLIES 3
Pascal_KTeam
Resolver I
Resolver I

Hi

In Power Query Designer you can select the value column and go to "Transform" - "Extract" - "Text Before Delimiter" and then add "[" as delimiter2020-02-19_17h30_46.png         

Anonymous
Not applicable

At the top of the column where it says ABC, click and select number and see what affect that has on the result?

If that data has the [6] as part of the text, then that maybe related to an footnote, and you will need to strip it out, maybe using the SUBSTITUTE command?

ammcleod
Frequent Visitor

Hi @atin ,

In the Query Editor, you could highlight the column "Population 2000 estimate" and Split the Column by Delimiter. Make the Delimiter "[" and the column should be split by the start of the Bracket. 

 

From there you can go ahead and delete the second column that holds the rest of the Bracket and the number inside. 

 

Let me know if this works for you! 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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