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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
BenZEN
Regular Visitor

Text. Combine

Hi All, 

I'm starting to explore the world of Power-BI and Power Querries. I have a table for the administative structures with the different levels in each collumn. To take an example for switzerland, i would have a collumn [ADM4_EN] for the village name, a collumn [ADM3_EN] for the communal name, a collumn [ADM2_EN] for the Districts and a collumn [ADM1_EN] for the canton name

I'm tryimg to create a new custom collumn to generate an unique location code in the form : the VILLAGE name in full - COMMUNE name (first 5 letters)-DISTRICT name (first 3 letters)- Cnaton name (first 3 letters). SHould look like this : VILLAGE-COMMUN-DIS-CAN

After some digging on web based help sites, i got down to this formula : 

=Text.Combine({text.upper[ADM4_EN],Text.Start(Text.Upper[ADM3_EN],5),ext.start(text.upper([ADM2_EN],3)),text.start(text.upper([ADTM1_EN],3)}, "-")

But there seems to be an error on the last bit as it shows me 'token ',' expexted when i hover on the "-" . 

Any suggestions ? 

Thanks !!

 

1 ACCEPTED SOLUTION
Khushidesai0109
Resolver I
Resolver I

Hiiii @BenZEN 

Try this

= Text.Combine({
Text.Upper([ADM4_EN]),
Text.Start(Text.Upper([ADM3_EN]), 5),
Text.Start(Text.Upper([ADM2_EN]), 3),
Text.Start(Text.Upper([ADM1_EN]), 3)
}, "-")

Did I answer your question? Mark my post as a solution! And Kudos are appreciated

View solution in original post

2 REPLIES 2
BenZEN
Regular Visitor

Thanks ! it worked.... Brackets are my devil ^^ 

Appreciate this super quick reply. Have a nice day 

Khushidesai0109
Resolver I
Resolver I

Hiiii @BenZEN 

Try this

= Text.Combine({
Text.Upper([ADM4_EN]),
Text.Start(Text.Upper([ADM3_EN]), 5),
Text.Start(Text.Upper([ADM2_EN]), 3),
Text.Start(Text.Upper([ADM1_EN]), 3)
}, "-")

Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.