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

Dynamic URL

Hi All,

 

I have a situation where I have appended two tables and now want to create a column for Dynamic URL.

 

Below are the two URL column i created seperately for the tables.

 

 
Both the URLs were working fine seperately. 
Now I have appended the two tables and want a column with URL for both the cases.
Plz let me know the best approach I can follow for the same.
 
Regards,
Himanshu
1 ACCEPTED SOLUTION

I made an error on the previous formula "Propeller" should be followed by a comma (,) and not an equal sign (=)

Thanks,

Moiz
Was I able to answer your question? Mark my post as a solution to help others. Kudos if you liked the solution.

View solution in original post

5 REPLIES 5
moizsherwani
Continued Contributor
Continued Contributor

@Anonymous you say you have appended the two tables, but if you do so after the URL column is created then the url column should automatically be part of the appended table. 

 

If you have appended the raw tables and not created the url column, in that case you will need to either have a custom column in each table which identifies which of the two tables it is (sparkplug or propeller) or there might be a field in the existing tables which can you let you know which table the data is from.

 

Once this is done you can use something like

URL =
SWITCH (
    [Column which identifies which table the data is from],
    "SPARKPLUG",
        "https://dev.azure.com/powermatrix/Sparkplug%20R2/_workitems/edit/" & [Work Item Id],
    "PROPELLER" = "https://dev.azure.com/powermatrix/Propeller%20R2/_workitems/edit/" & [Work Item Id]
)

  

Thanks,

Moiz
Was I able to answer your question? Mark my post as a solution to help others. Kudos if you liked the solution.
Anonymous
Not applicable

@moizsherwani 

 

I have a column "Product" in my Appended query (This is a calculated column) but when using Switch function it is not giving the desired result. Data is not coming correct.

 

Himanshu_13_0-1648727332806.png

 

I want something like :

 

When 

Combine[Product]="Sparkplug" then url will be 
"https://dev.azure.com/powermatrix/Sparkplug%20R2/_workitems/edit/" & [Work Item Id]

And when 

Combine[Product]="Propeller" then url will be 

"https://dev.azure.com/powermatrix/Propeller%20R2/_workitems/edit/" & [Work Item Id]
 

@Anonymous  did you change the needed column names, does the following not work for you?

 

 

Calculated Column URL =
SWITCH (
    Combine[Product],
    "Sparkplug",
        "https://dev.azure.com/powermatrix/Sparkplug%20R2/_workitems/edit/" & Combine[Work Item Id],
    "Propeller", "https://dev.azure.com/powermatrix/Propeller%20R2/_workitems/edit/" & Combine[Work Item Id]
)

 

Thanks,

Moiz
Was I able to answer your question? Mark my post as a solution to help others. Kudos if you liked the solution.

I made an error on the previous formula "Propeller" should be followed by a comma (,) and not an equal sign (=)

Thanks,

Moiz
Was I able to answer your question? Mark my post as a solution to help others. Kudos if you liked the solution.
Anonymous
Not applicable

I actually changed the source column and it worked.

 

Thanks for the help !!!

 

Regards,

Himanshu

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.