Does the following link help you in finding a solution to your challenge: Swapping Measures Using Parameters | Tableau Software
It doesn't completely illustrate how to do this for a dual line chart, but you should able to emulate this to get the results you need. I'll leave that to you as an exercise.
Let us know in case you need more assistance; good luck!
I really appreciate...
In example we just have dual line charts only but My Requirement is I would like to also select all 3 columns to compare data in line chart.
we can compare only 2 line chart in above illustration.
Ooh, I see what you mean now. See the attached workbook for an example.
Don't mind the calculations Measure1, Measure2 and Measure3, but take a look at "Measure1 selected" and the others, as well the parameters.
Does this emulate the functionality you are looking for?
Anand H.twbx 1.1 MB
Thanks a lot Timothy,
I really appreciate the way you have suggested in workbook.
But here my little concern is I would like to have an option same like filter all the measure should be display in same filter option multi select checkbox functionality.
If you can suggest here that really helps me.
The trick here is to have the data created as a tall table. Because there is no sample data attached in the original post, I am using some random generated sample data as attached in the excel file (Sheet 1). Note how the various measures (Column X, Column Y and Column Z) are under Metrics Categories with their corresponding values (a tall table.
Once the data is formated into this format, charting is pretty straight forward -
1. Add Metrics category to filter
2. Add month (or any dimension) to column
3. Add Value to Rows
4. Drop Metrics pill to the color so that the line chart is split by Metrics category.
5. Play around with the filters -
If the data is in the wide format as below, then you need to pivot the data and follow the rest of the instructions as said above.
Here is the link on how to Pivot Data from Columns to Rows.
Multi Metrics Data.xlsx 10.3 KB
Thanks for your quick and useful answer...
Thats True... we have to do pivoting in Data Source but we might have issue of data duplicate as other column data also there.
Do you have a sample Excel file or Tableau Packaged workbook that can help better understand your need?