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
Anonymous
Not applicable

How to add another columns by extract specific value in the existing columns

Dear, Community 

i want to extract the value in columns to add to new columns : i just want to extract the value that not contain PP - or KP- 

how can do that i think both can be doing by Base on it key or by the value in Column[Place] which it some value containt '' - " 

KeyPlacesNew < columns>
BBKPhnom PenhPhnom 
BBKKompotKompot
BBKPoipetPoipet
CNNPP - Toul Kork 
TDDVN - Beung Keng Korng 
DTDKP - Terk Chou 
7 REPLIES 7
tamerj1
Super User
Super User

Hi @Anonymous 
Here is a sample file with the solution https://www.dropbox.com/t/UpdJBIaJqjoGUM3F

New Column = 
VAR Items = SUBSTITUTE ( Data[Places], " ", "|" )
RETURN
    IF ( 
        Data[Key] = "BBK",
        PATHITEM ( Items, 1 )
    )
Anonymous
Not applicable

@tamerj1  

I don't want a substiute i just want to extract  Full Value ( Phnom Penh is still Phnom Penh) the only value where the Key = BBK  

@Anonymous 
Then it would be

New Column = 
IF ( 
    Data[Key] = "BBK",
    Data[Places]
)
Anonymous
Not applicable

@tamerj1 

it works but only for one key "BBK", so what if i want extract multiple value :

There a Parent key , code and name

As you see the picture under the Parent key we have BB1--> hold "

BB-BATTAMBANG
BB-MOUNG RUESSEI
BB-BAVEL

"

And Code BB1 --> "BATTAMBANG RO"

It simply word i could say that BATTAMBANG RO is a Country and the BB- above is a City but it just store in one columns separateScreenshot (78)_LI.jpg by Parent key and code 

 

 

Hi @Anonymous 
Kindly provide the expected output with esplanation based on this screenshot. Thank you 

Anonymous
Not applicable

@tamerj1 

here is a expected output should look like

 

BB1BATTAMBANG RO                       BB-BATTAMBANG
BB1BATTAMBANG ROBB-MOUNG RUESSEI
BB1BATTAMBANG ROBB-BAVEL

@Anonymous 
It seems I'm I am unable to undestand your requirement. My apologies. Maybe we can connect via Teams or zoom for better understanding. Please let me if you are aviable for a quick meeting. Thank you

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.

Top Solution Authors