The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Number | Company | URL Link |
12 | Amazon | amazon.de/12 |
14 | Amazon | amazon.de/14 |
18 | google.de/18 | |
21 | google.de/21 | |
22 | Apple | apple.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.
@Anonymous Create a calculated column like this:
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.
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])
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