Tableau Tips — How to Use What-If Parameter

Parameters are useful when you want to add interactivity and flexibility to a report, or to experiment with what-if scenarios. Using the superstore dataset, supposing we have a certain order quantity target we want to evaluate on all states and give dynamic feedback based on how well we met that target.

After we have needed fields in this simple table, right click quantity and create parameter.

A parameter won’t do anything until it’s tied to an element in the viz. Parameters can be referenced in calculations, filters, and reference lines. So in order for the parameter to function, we will need to refer it in a calculation.

IF sum([Quantity]) > [Quantity Parameter]
    THEN "We did good here!"
ELSEIF   sum([Quantity]) = [Quantity Parameter]
    THEN "Not bad but we can do better"
ELSE "Need to sell more!"
END

Drag that sales performance to the rows  and right click quantity parameter to [show parameters], and you can then change parameter to see how well we perform!

Leave a Reply