I think i didn't explain myself clearly on this. When i said use parameter control to refresh data, i just meant having a data filter on the dashboard and depending on amount of monthly data i had, a user could select a particular month to change the data on the dashboard. So for instance, i have one designed dashboard and i can look at January, or look at September by selecting the parameter control.
Oh, that's easier
Create your parameter and then create a calculated field with the following code:
Then just drop this calculated field into your viz and show parameter control.
Ah, in that case, the easiest way to do this is with a quick filter.
1. Drag your date field to the Filters shelf using the RIGHT mouse button. (This is a Windows shortcut).
2. Select 'Month / Year' and 'OK'.
3. Select 'Use All' and 'OK' on your filter.
4. Right click on the pill in the Filters shelf and select 'Show Filter'.
Thanks i'll try this tomorrow. Fingers crossed. Just checking, when i setup my parameter control, do i select string or integer?
If you use Peter's solution, it depends on what type your [Month] field is.
If [Month] is a number (1-12), then make your parameter an integer. If it's text ("Jan", "Feb", etc.) then make your parameter a string with the same values.
If you use my solution, you would not use a parameter at all; you're just setting a filter directly on the date field.
Sadly i haven't used SQL in over 15 years so i'm not so hot on it. i'll try the other way. The issue i find is after i've created my parameter when i try to do the calculation in the calculated field, it always comes up with an error. It doesn't like mixing strings with integers.
You can ignore the SQL suggestion (I misunderstood you), but there's an option right after Peter's explanation to use a quick filter and no parameter.
To to address the error in the calculated field, just make sure your parameter is the same type as the field you're comparing it to.
Hi Angela, you can also post a .twbx and we can set it up for you, either using real or dummy data depending on if you have any data privacy issues.
I don't understand (yet) why you are using a parameter. You say
Angela Delnevo wrote:
a user could select a particular month to change the data on the dashboard. So for instance, i have one designed dashboard and i can look at January, or look at September
but you don't need a parameter to do that, just filter on your date dimension and maybe change it to discrete in the Filter shelf.
Tableau support spoke with me and helped me understand I didn't need to use a parameter.
Case closed and i'm one happy person!
Awesome Making things as simple as possible is always the best
Can you mark an answer as correct in this thread though please ? (it could even be your own )