Split one Dimension into its components
Submitted by mbaumga on November 2nd, 2009
mbaumga
5 posts
joined Nov '09
Hello,
have a look at the attached xls file. You see that I have a column called "Indicator". I now would like to make a scatter plot with KPI_1 on the x-axis, KPI_2 on the y-axis, and using KPI_3 to size the circles.
I thus somehow need to split my dimension "Indicator" into 3 specific components for each of the KPI. Can this be done in Tableau ? Or is it mandatory to have basically one column in your data source, per dimension ?
Thanks for your help !
Regards
Marcel
| Attachment | Size |
|---|---|
| Tableau Problem.xls | 18.5 KB |
Comments
November 2nd, 2009
clint
Marcel,
this ought to be fairly simple -- assuming that the real data isn't more complex.
Your basic formula is going to be
IIF([Indicator]="KPI_1",[Value],NULL)
Which basically says:
If "Indicator" is equal to "KPI_1" then use [Value] otherwise do nothing
You'll set up one calculated metric per KPI so you will end up with three calculated metrics: "KPI 1 Value", "KPI 2 Value" and "KPI 3 Value". Drag one to the row shelf, a second to the column shelf, change the visualization to an x-y scatter plot and then drag the third to the size shelf.
In the attached example I've also added year to the color shelf and country to the shape shelf.
-Clint
November 3rd, 2009
mbaumga
5 posts
joined Nov '09
Clint,
thanks. I get it. However:
I don't get my scatterplot. As the calculated measure "KPI1 Value" is say 110, 120, 90, NULL, NULL, NULL and "KPI2 Value" equal to NULL, NULL, NULL, 90, 85, 115, I don't get a scatterplot. All the values for KPI1 are on the horizontal axis, and all of those for KPI2 on the vertical axis.
I still am on Tableau 4.1, so I couldn't load your tableau workbook. Can you provide it for version 4.1 ?
Thanks again !
Marcel
November 3rd, 2009
omomyid
84 posts
joined Jan '09
Clint here (wasn't logged in yesterday).
I suspect that TB is treating your new metrics as dimensions and/or discrete (as opposed to continuous measures) so make sure to change each into a continuous measure (using whichever aggregation is appropriate).
Luckily, I still had 4.1 installed so a 4.1 extract is attached (hopefully that will work).
November 4th, 2009
mbaumga
5 posts
joined Nov '09
Hello,
thanks. It works now. I didn't realize that I needed to use the "Level of Detail" shelf. Now I exactly see the graph that I wanted.
Regards
Marcel
November 4th, 2009
omomyid
84 posts
joined Jan '09
Marcel,
glad that worked out for you.
C
Post new comment