Try duplicating the field, then set one to numbers and the other to strings. Although having your data in this sort of shape will probably cause you headaches down the road. It would be cleaner if you created a new field in your data source for type of question: Multi-choice or Rating. And then replaced all your Always, Sometimes, Never strings with 1,2 & 3. That way everything is a number, and you can put the Type field on the filter shelf so you can separate them out. That's probably best practices, but the other way should work too.
Hi Shawn, thanks for the quick response.
I tried duplicating the Dimension in Tableau, but the field type seems to stick to both the original and the duplicate, so I can't seem to make one a string and one a number.
I would duplicate in my original excel file, but I reshape the data using the excel plugin for Tableau and I can't figure out how to still do that and have two types of "Response" fields. (FYI the Always/Sometimes/Never example was just an example -- I have a bunch of different text strings for various RESPONSE items, and they're all different, so it's not as easy as just making them a number. I'd have to go through and assign different numbers to like 40 different possible responses).
I appreciate your help and would love to know any other ideas you have on how to solve this. Can I somehow differentiate the type between the original RESPONSE field and the new RESPONSE(copy) field that I created within Tableau?
Hi Susan, let me poke around a bit. In the meantime, feel free to send me your Excel file and/or packaged workbook off-line. My email should be visible on my profile page. I'm sure we can work this out.
One one to do this is to edit the duplicate and use one of the Type Conversion functions in front of the field. Similar to the following:
Hope this helps!
Thanks Tracy -- I'm kind of a newbie. Can you explain in a little more detail how to do this? Thank you!
Sure! Right click on the desired dimension and select Create Calculated field.
Then, depending on which data type the dimension is and what is wants to be changed to. The following link provides further information on different type conversion functions:
Name the calculated field appropriately and voila! you should have the same field, but with different data types.
Let me know if this still does not make sense!
I did the type conversion, which looks like this:
...and the dimension type shows as "=ABC".
But it still counts any text content as "NULL", so when I count the number of records I will show counts for items 1-7 (my numeric responses) but everything else is counted as "NULL".
Any ideas? Thanks so much, if I can get this to work it will save me a TON of time. :-)
I will definitely take you up on that. I ended up doing as you suggested and changed my data source so that even the string responses are a number, and then changed the aliases in Tableau. But it's pretty time consuming and if there's an easier way it would be a big help.
By the way, do you know of a way to autofill aliases based on a table or something? Going in an editing the alias names one by one takes FOREVER!
Any sufficient solution for this.
I would suggest creating a new thread of your own, along with a detailed write-up of your particular scenario, a packaged workbook that exemplifies your data structure (use sample data or randomize yours if needed), as well as a mock-up/description of what you want as an end result.
If you post a packaged workbook example, I'll be happy to take a look at your problem.