Let’s say you are using Measure Names and/or Measure Values in your viz to show bunches of lovely measures.
You’d like to be able to control which measures are displayed via a filter on the URL – just like you can do with other fields. Can you?
Yes, but it’s not completely straight forward nor is the technique I’m about to discuss supported.
The basic syntax is as follows:
http://server/views/WorksheetName/SheetName? +
[:Measure Names]=[Name of your data source].[Ugly Measure Name]
Example:
http://svr/views/WorksheetName/SheetName?[:Measure Names]=[MyData].[sum:MyMeasure:qk]
How do you find “Name of your data source” and “Ugly Measure Name”? You spellunk a little in the XML of your workbook.
Here’s the XML from a sample workbook I’ve posted to public….
The data source:
The ugly measure names:
So, my string is:
http://public.tableausoftware.com/views/FilterOnMeasureName/Sheet1?[:Measure Names]=[Sample – Superstore Sales Multi-language (Extract) Extract].[sum:Sales:qk],[Sample – Superstore Sales Multi-language (Extract) Extract].[sum:Quantity ordered new:qk]
Here’s the viz before it’s filtered. Note that the “Friendly name” of one measure is displayed as “Order Quantity” – NOT the real name of “Quantity ordered new”:
..and here’s the filtered version running live on Public:
(FYI, the embed above is utilizing the <param name=“filter” value=“something”/> notation to drive the filter…just “View Source”, and you can see what I mean)