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

Creating an URL-Link depending on columns

Hi, 

 

I want to create an URL-Link depending on the content of the columns. Here is an example, how it should look like in the end. So I have three or more companies and different and unique numbers

 

NumberCompanyURL Link
12Amazonamazon.de/12
14Amazonamazon.de/14
18Googlegoogle.de/18
21Googlegoogle.de/21
22Appleapple.de/22

 

Attention: Link is not always "company".de/"number". It can also vary or be a different link. I just want to make the chosen link be dependent of the company

 

I want to create URL Link, where the part of the link before the number depends of the company. In addition, the link should then be connected to the number of the first column. 

 

This includes several IF-queries and connecting the links as a result of a condition

 

If      company = amazon then "Link 1 for amazon"+number
        company = Google then "Link 2 for google"/+number

 

and so on. 

 

 

Thanks in advantage. 

 

3 REPLIES 3
Tahreem24
Super User
Super User

@Anonymous Create a calculated column like this:

Column = CONCATENATE(LOWER('Table'[Company]),".com")&"/"&'Table'[Number]
Capture.JPG
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

Okay thanks for your answer @Tahreem24 : My table was just an example. In my data, i dont have always the following type: company .com / number 

 

I have for example: company: GLS GENERAL LOGISTICS SYSTEMS and Number 123 and the url link is 

 

https://www.gls-pakete.de/sendungsverfolgung?trackingNumber=123

 

I can always add the number at the end, but the link are not exactly like the columns in my example. I want to make the url link depending on what is in the column company and then add the number from the first column.

Anonymous
Not applicable

Hi @Anonymous  ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create a custom column as below in Power Query Editor:

if [Company] = "GLS GENERAL LOGISTICS SYSTEMS" then
  "https://www.gls-pakete.de/sendungsverfolgung?trackingNumber=" & Text.From([Number])
else if [Company] = "youtube" then
  [Company] & ".com"
else
  [Company] & ".de/" & Text.From([Number])

yingyinr_0-1654761850394.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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.