forums

Use these forums to ask questions and discuss Tableau.

Hyperlinks - Measures vs Dimensions, and multiple fields

Is it possible to use measure fields in hyperlinks?

As an example, if I was to count number of customers by using a customer ID field and counting distinct the number of customer IDs, I may have a bar in a bar graph that represents 10 customers (and 10 underlying IDs). If that Customer ID field is a measure I can't seem to use it as a field in the hyperlink - hyperlink lists as invalid. All of the IDs are in view (and visible when viewing underlying data).

Additionally - I'd like to click on a bar in a bar graph and create a query string based on all of the underlying ID's

For example: http://search?custID=1+3+5

It seems in order to this I have to add cust ID to Level of detail and then select each individual sub bar in the bar total bar and then hyperlink. This isn't practical in cases where I have many customer IDs creating a single bar. Is there not away to select the bar not broken into detail and have all of the underlying cust IDs get based in the search query? -- all of the data is there.

Thanks in advance.

Comments

Yes, there are some situations where it is possible to do hyperlinks on measures. Basically, you need to not aggregate on that measure -- right clicking on the field on the shelf and select "All Values" is the easiest way. In my attached workbook, there is an example of using Margin to link to a Google search.

However, this doesn't really get at the root of your first question. The better thing to do in your case is to make the customer ID field a dimension. Database ID fields are often imported as measures when they are represented as numbers, but their role is really a dimension. Drag your employee ID field form the Measure window to the Dimensions window, or right click on it an convert it to dimensional.

Making the ID field a dimension will not prevent you from counting the number of customers or counting the distinct number of customers -- you can create a calculated fields (a measure) for the distinct number employees, or you can use the built-in Number of Records fields to get the count. My attached example shows both -- in my example I'm doing a link on the products, not employees, but the concept is similar.

Also, my example workbook, I've turned mark border on to show stacked bars actually contain multiple marks on them -- in this example, multiple products, which are stacked.

Finally, there is a way to do hyperlinks with multiple values. When you define the hyperlink, be sure to enable "Multi-select" and then choose the appropriate delimiter for you URL -- a + in your case. You can then select multiple marks (rubber band select, shift-select, control-select), then right click and you will see the link for the entire selection. See the attached screen shot.

If you want to select the whole stacked bar to follow a link, first click on the column or row header to highlight the whole row, then right click on one of the bars and follow the link -- see the attached screen shot.

I hope this was helpful.

Austin

AttachmentSize
Select header then right click on mark.png42.33 KB
Hyperlinks on Multiple Marks.png44.11 KB
Hyperlink Examples.twbx249.8 KB
Syndicate content Subscribe to the comments on "Hyperlinks - Measures vs Dimensions, and multiple fields"