2 Replies Latest reply on Oct 23, 2018 11:49 PM by Markus Heiland

    Parameter Settings in URL and Default Parameter Setting at Startup

    Markus Heiland



      first of all: I still have to use version 10.4 because of an 32-bit environment.


      I have a dashboard with 2 parameters with which I can select the week and the year. I have to use this as a parameter because I want to use the selected values in calculated fields, which is unfortunately not possible with the values selected in filters (this would be such a useful feature). Now I have 2 problems with that:


      1. When the user opens the dashboard, the last full week should be displayed automatically and the parameter should be set accordingly. I haven't been able to figure out how to do this yet, although this is a very common practice.


      2. I would like to send a certain setting of the parameters with the URL, e.g. week = 42 and year = 2018. This is also possible in principle, but the parameters will then no longer work in the calculated fields. For example, I use a calculated field in a filter to display the last 6 weeks. However, if I send the parameter setting with the URL, only this week will be displayed. If I select the value in the parameter directly, then the last 6 weeks are displayed. But the direct selection is only possible if I didn't send the parameter setting with the URL, but open the dashboard without URL parameters. With URL parameters the user is not able to select another value, because then he gets an empty dashboard ... is not very helpful.


      I hope there's a solution to this, as I have this circumstance in several dashboards.


      Greetings Markus

        • 1. Re: Parameter Settings in URL and Default Parameter Setting at Startup
          Steve Martin

          Hi Markus,


          Unfortunately, point 1 has been a persistent problem since parameters were introduced but being lists, are also quite limited in their functionality. The great news is that this has been part-rectified, the not so great news is, that this only applies to 2018.2 and the use of extensions (Tableau Extension Gallery (BETA) )

          As an alternate, one parameterised function I pulled together a while ago that might work for you involves a switch between the Max(Date) field so for you, filter your year to Max(Year) and Week to Max(Datepart('week',<Your date field>)) and then use the parameter simply to switch between using the maximums, which will always be the latest periods in your data, or a selected value from your pre-populated parameter.


          As for your second point, I am lost as to the problem if you could explain a little more:


          It sounds as though you are saying that by using a parameter to determine the period, you are then actually seeing just the last week, but manually updating the url is then preventing the date of the second workbook from being altered. Please can you confirm this and, how you are applying the url value as my previous use of parameters in this way (I regularly use this method), has not created the problem you appear to be describing.



          • 2. Re: Parameter Settings in URL and Default Parameter Setting at Startup
            Markus Heiland

            Hi Martin,


            thank you for your answer.


            Concerning point 1: I will try the Max values.


            Regarding point 2:


            The situation is as follows: On the dashboard, you can select the week with the Week parameter and the year with the Year parameter. When I publish the dashboard to Teableau Server, you can use the URL to send values for the two parameters, e.g. Year=2018 and Week=42 (i.e. //&Year=2018&Week=42). When I do this, the dashboard is set and called for the corresponding week. However, the parameter also calculates a filter that represents the last 6 weeks. This doesn't work anymore and only the one week from the URL is displayed in the corresponding area. Furthermore the user can't select another week, the dashboard remains empty, because the 42 as week remains part of the URL. This is not a nice behaviour ...


            Thanks and greetings