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
Alta88
Helper IV
Helper IV

Adding Hyperlinks to a Table

We send out daily reports to another team so the managers can relay any errors cited during our audits. The trouble is, the IDs to the accounts we review are dead - they can't take the user back to the website where they were built. How do I get these IDs to become clickable links within the table? 

 

Alta88_0-1656366779107.png

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

You can create a measure that builds the URL to use.  In my example I have one that builds a URL to the nih.gov site using a drug code.

Drug Search NIH =
VAR _DrugCode = SELECTEDVALUE ( vDRUGCODE[Drug_Code] )
RETURN
IF ( NOT ISBLANK ( _DrugCode ),
"https://mor.nlm.nih.gov/RxNav/search?searchBy=NDC&searchTerm="& _DrugCode)

Then you use conditional formatting on the field and set this as the Web URL.

jdbuchanan71_0-1656367993037.png

jdbuchanan71_1-1656368008703.png

That will make it a clickable link in the report:

jdbuchanan71_2-1656368071678.png

 

 

View solution in original post

10 REPLIES 10
Alta88
Helper IV
Helper IV

So I tried that too, but no luck. This is very bizarre. 

jdbuchanan71
Super User
Super User

If you add a new page to your old file can you do hyperlinks on the new page?  Maybe only have to rebuild the one.

Alta88
Helper IV
Helper IV

Yeah, it's really weird. So I opened a new report and added data to a new table and the option finally showed up: 

 

Alta88_0-1656704268903.png

 

Something must be wrong with that specific file then. How do I get bugs out of a file? I don't want to build that report from scratch since we send it out daily.

jdbuchanan71
Super User
Super User

I can't fugure out why the 'Web URL' conditional formatting option is not appearing for you.  It is there for me on field types of text or date/time so it's not that.  It's there even before I create a url measure.
If you create a new blank report and pull in some of the same data is the option available in the new one?  It seems there is a bug that can pop up in certain files.

https://community.powerbi.com/t5/Desktop/Web-Url-Conditional-Formatting-Unable-to-Select-Field/td-p/...

 

jdbuchanan71
Super User
Super User

There are 2 'grid' visuals in PowerBI, Table and Matrix.  Conditinal formatting can only be applied to the values section of a matrix so I just wanted to point that out. Are you using a Table or a Matrix?

jdbuchanan71_0-1656599150350.png

 

I see. Yes, I'm using a Table.

jdbuchanan71
Super User
Super User

I think it is only available in the table visual, not a matrix.

I'm not sure I understand. I had the table visual open when I clicked in the fields to select Conditional Formatting. Please advise. 

Alta88
Helper IV
Helper IV

@jdbuchanan71 Thanks so much! This is super helpful -- so I plugged in the new measure but for some odd reason when I go to Conditional Formatting I don't have the Web URL option. Is there a way around this? 

 

 

Alta88_1-1656452011281.png

 

 

jdbuchanan71
Super User
Super User

You can create a measure that builds the URL to use.  In my example I have one that builds a URL to the nih.gov site using a drug code.

Drug Search NIH =
VAR _DrugCode = SELECTEDVALUE ( vDRUGCODE[Drug_Code] )
RETURN
IF ( NOT ISBLANK ( _DrugCode ),
"https://mor.nlm.nih.gov/RxNav/search?searchBy=NDC&searchTerm="& _DrugCode)

Then you use conditional formatting on the field and set this as the Web URL.

jdbuchanan71_0-1656367993037.png

jdbuchanan71_1-1656368008703.png

That will make it a clickable link in the report:

jdbuchanan71_2-1656368071678.png

 

 

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.