Lots of questions...
Hope some of them don't get lost in answers to others. Sometimes it's better to break up multiple questions into separate threads...
But to start, one way to base formats/colors on a parameter value is to create a calc field that gets set based on the value of the parameter, and then use that calc field for formatting purposes. So you can drag the calc field to the color shelf, and that will impact colors when the parameter changes. Ditto size shelf...
Actually, now that I've opened your workbook, I see you did that already...
Another option you can try is conditional formatting. See attached.
I broke your calc into two parts. Both are on the text shelf, and the way it is set up, only one or the other will have a value. (The other will be null.) format within the TEXT edit box. I chose red and green. You can format each calc with $ and decimals as you need.
Tableau help 2.twbx 981.5 KB
See attached for using a parameter to filter.
I created a new parameter that lets you type in a number. Tableau will filter to anything greater than that number.
As for switching colors AND switching color ranges based on size ... I'm striking out on that one so far.
Tableau help 3.twbx 982.0 KB
This is helpful. On the "Sales Limit" parameter where people can type in the number they want how would I change that to a Yes/No selection based upon a predetermined value? i.e. if "Yes" is selected only values > 1,000,000 show, if "No" is selected all values show.
I also don't understand how you were able to drag both parameters to the text shelf without enlarging the size of the field.
1 of 1 people found this helpful
if [Sales > 1,000,000] = "Yes" then
// limit to sales over 1,000,000
if SUM([Sales] ) >100000 then 1 else 0 end
// get all
Thank you again, but I am also wondering how you were able to add two things to the text shelf without increasing the size of the fields. If you go to the WBs you put up and drag the Item Price and sales Parameter out of the text shelf, and then drag them both back you'll see what I mean. The size of the cells in the worksheet gets enlarged. Is there a way around this? I manually resized them, but for the WB I'm building I'll have 4 fields I'm toggling between, and when I toggle to the others the vertical placement of the numbers gets out of whack.
I think I understand what you are saying...
When you drag them back into the text shelf, Tableau inserts the two fields one above the other. Like this:
<AGG((parameter) Item Price)>
I edit the text so that it looks like this:
<AGG((parameter) Item Price)><AGG((parameter) Sales)>
(And I change the colors and formats of the individual fields as needed.)