Parameters – Parameters are dynamic variables that can be used as placeholders in formulas.
Replacing the Static values by Dynamic Values.
EX: Dynamically selecting Columns (Fields), Dynamically
selecting Top 10,
Bottom N
EX: Dynamically Select Measure Field.
1) Right click in dimension window, click on Create Parameter.
2) Define the Type: String,
3) Select List option since we are defining manually.
Sales
Profit
4) Create a calculated field as below
if [Paramater] = "Sales" then [Sales] else [Profit] end
5) Drag the Region onto Rows shelf, drag the above calculation into Column's shelf.
6) Right click on Parameter, click on "Show Parameter Con trol"
7) Now we can Select Either [Sales] or [Profit].
Note: As of now in Tableau we can select 1 Value max at a time.
1) Dynamically select the Colour.
Sol:
1) Create a Parameter “Colour” with the Following values like the below screen shots.
Green, Blue, Red, Orange
2) Drag Region onto Row Shelf, Sales onto Column Shelves.
3) Create a Calculated field like the below
Name: Dynamic Colour
Syntax:
case [Color]
when "Green" then "Green"
when "Blue" then "Blue"
when "Red" then "Red"
when "Orange" then "Orange"
end
---- ------ Here [Color] is the Parameter which was created in the 1st step.
4) Drag “Dynamic Colour” onto Colors mark.
5) Right click on “Color” parameter, click on “Show Parameter Control”.
6) Now select colours 1 by 1 from “Parameter” then assign right colours.
Parameter - Options:
1) If you to show paramater values from any specific column, Select List Radio Button
from Alloawable Options then select Add from Field, then select the Field.
2) If you want to create a Parameter on specific column, right click on that,
click on "Create Parameter".
Replacing the Static values by Dynamic Values.
EX: Dynamically selecting Columns (Fields), Dynamically
selecting Top 10,
Bottom N
EX: Dynamically Select Measure Field.
1) Right click in dimension window, click on Create Parameter.
2) Define the Type: String,
3) Select List option since we are defining manually.
Sales
Profit
4) Create a calculated field as below
if [Paramater] = "Sales" then [Sales] else [Profit] end
5) Drag the Region onto Rows shelf, drag the above calculation into Column's shelf.
6) Right click on Parameter, click on "Show Parameter Con trol"
7) Now we can Select Either [Sales] or [Profit].
Note: As of now in Tableau we can select 1 Value max at a time.
1) Dynamically select the Colour.
Sol:
1) Create a Parameter “Colour” with the Following values like the below screen shots.
Green, Blue, Red, Orange
2) Drag Region onto Row Shelf, Sales onto Column Shelves.
3) Create a Calculated field like the below
Name: Dynamic Colour
Syntax:
case [Color]
when "Green" then "Green"
when "Blue" then "Blue"
when "Red" then "Red"
when "Orange" then "Orange"
end
---- ------ Here [Color] is the Parameter which was created in the 1st step.
4) Drag “Dynamic Colour” onto Colors mark.
5) Right click on “Color” parameter, click on “Show Parameter Control”.
6) Now select colours 1 by 1 from “Parameter” then assign right colours.
Parameter - Options:
1) If you to show paramater values from any specific column, Select List Radio Button
from Alloawable Options then select Add from Field, then select the Field.
2) If you want to create a Parameter on specific column, right click on that,
click on "Create Parameter".
No comments:
Post a Comment