Loading

Parsing URL Parameters in Tableau Desktop

Publiceringsdatum: Apr 8, 2025
Uppgift
How to parse URL parameters in Tableau Desktop.

For example, how to get values for "Category", "Media" or "Programme" in the example URL: /www.example.url/?Category=brand&Channel=paid%20search&Media=Bing&Programme=PG&Region=National
Steg
Use regular expressions in order to capture the value of URL parameters. In Tableau this can be achieved with the built-in formula REGEXP_EXTRACT_NTH, for example: 
REGEXP_EXTRACT_NTH ([URL], '(Category=)(.*?)&', 2) 

This formula will capture the value of the "Media" URL parameter. To capture the value of other parameters please just replace the parameter in the formula, for example for "Media": 
REGEXP_EXTRACT_NTH ([URL], '(Media=)(.*?)&', 2) 

And the following formula will capture the value of the "Programme" URL parameter. 
REGEXP_EXTRACT_NTH ([URL], '(Programme=)(.*?)&', 2) 

 
Ytterligare resurser
For more information about Regular expressions, see Additional Functions in Tableau Help.

To view the above steps in action, see the video below. 
Note: the video has no sound.
 
Knowledge-artikelnummer

001453727

Bilagor

Regex_Example.twbx

12 KB

 
Laddar
Salesforce Help | Article