Pivot2: "Clickable URL Links In Pivot Rows" Re-Implemented
Summary: intapiuser provides a detailed guide on transforming URLs in pivot table fields into clickable links, which is beneficial for accessing internal and external web resources. The guide includes adding a plugin, creating a URL dimension, and configuring URL columns within the pivot table. Luke Flett queries the advantage of this method over another approach available on the Sisense community, suggesting that enabling HTML rendering in pivot tables might be preferable. The discussion emphasizes different methods to achieve clickable links in pivot tables and the advantages of custom configurations.
Introduction
In some cases you might have a URL’s in your fields in the cube, this post will show you how to modify URLs placed in rows of a Pivot table into clickable links.
Purpose & Benefits
This will allow you to jump to either internal or external web resources for further information regarding a certain element.
Steps
STEP 1 - ADD THE PLUGIN
- Download the latest version of the plugin from this link
and extract the enclosed folder into the plugins folder:
/opt/sisense/storage/plugins/
STEP 2 - ADD A URL DIMENSTION
Create a a new pivot table and add the dimenstion that holds the URLs to be one of the pivot's dimensions
STEP 3 - CONFIGURE THE URL COLUMNS
COPY PASTE THE BELOW CONFIG SCRIPT TO THE WIDGET'S ID:
const columnsToRenderAsHTML = [3,4];
const columnsToRenderAsPlainURL = [3];
Note, you might need to add a column range for one column:
const columnsToRenderAsHTML = [1,1];
That there are two options for making your URL into a clickable link :
for HTML values (i.e. <a href='https://www.google.com' target='blank'>Google</a>) or
for normal URLS (i.e. https://www.google.com)
Depending on the type of values you have in your data, choose the correct option and set the column number you want to change, starting at 1.
Before:

After:

Notes:
If you'd like to have these links refer the user to an external page on the Internet, simply add 'http://' before all links in the actual data. This can easily be done by creating a new custom column in the table which holds the URLs and concatenate() 'http://' to the existing URL using the concatenate('string1', 'string2') function.
Replace the http://xxx.xxx.com/xxxx/ (just this, without touching the ' or ") with your fixed URL and the column you stated in the variable in the beginning of the code will be appended to the end of this URL.
This plugin doesn't appear in embed mode.
Luke Flett
·2 years agoWhat’s the advantage of this method compared with: https://community.sisense.com/t5/knowledge/clickable-url-links-in-pivot-rows/ta-p/9592
Personally, i would have thought that enabling “Allow rendering Pivot Table content as HTML“ would be preferred.