Calculated Text Fields

Hi! I’m still working on figuring out how to do things in Dundas vs. Tableau, and in Tableau, I would have a lot of custom text calculated fields for various things. I don’t seem to be able to find a way to do this in Dundas. It looks like you can only create a formula for a measure, so if I put something that returns a string at all, it puts Constant() around it and shows as blank on a metric set?

One thing I did, is if my survey data was coming in a pivoted form from the database (Question and Response as columns instead of having a column for each question), to avoid having another data prep step outside of Tableau Desktop, I could simply use a Fixed calculation with a MIN() or MAX() function–which work alphabetically on strings–to get that information for whatever level of detail it applied to. So for instance, it would be something like

{FIXED [Respondent ID], [Date], [Survey ID] : IF [Question Label] = "Company" THEN MAX([Response])}

and that would create a new column with the Company of every survey respondent because all the sample data for a respondent was consistent and didn’t change at the question level. Is the only way for me to do this now to ask those with a developer license to do it in the data cube?

I can’t remember all other use cases, but those MIN() and MAX() functions were really helpful since they also worked on strings and fixed expressions needed to be aggregated, but I can’t find anything similar in Dundas.

I also used calculated text fields a lot to combine fields for labels–like creating a custom Associate Name + " " + username field (some Associates have the same name but have unique usernames, so this will aggregate differently also–and actually for us needs to incorporate if-then logic because some Associates don’t have a username).

I would also create whole new text fields using case statements to translate numeric responses to text or group them differently if it wasn’t already available in the data, or a single text field that could display static text with the field name as a header.

Can I do any of this without a developer license in Dundas?

Hi Lindsey,

If your goal is to get just the Response value where Question Label = Company, this should be possible by adding those two dimensions to the metric set (Question Label could be added to either Slicers or Rows) and filtering Question Label to Company. It’s possible though that you would be limited to one getting one question-response combination this way. If what you actually want to do is “pivot” all of the Responses from multiple rows into named columns, we have an Pivot transform for that and we would recommend you go that route. Metric set formulas and formula visualizations can do a lot, but there is a point where data manipulation becomes advanced enough that data cubes were meant to be used instead.

When working with combinations of fields, there are options. You could just select both/all fields in the metric set, which will group the data by the combination of values in those fields, and it’s your choice whether or how each field is actually displayed by customizing the Data Analysis Panel’s Visualization tab. It’s also possible to concatenate the text that’s displayed in a visualization’s text properties by referring to them using keywords. Power users can also create predefined hierarchies where each member can be defined by multiple keys. Data cubes are an option when you really want/need a single field that concatenates the values from two other fields.

Data cubes, hierarchies, and metric sets are meant to be worked with together for users that want to access to all of those features, and the Developer seat type may be the most appropriate in some cases.

1 Like

Thanks for the response! Yes, the first case is one where I’d be “unpivoting” all the data to look at multiple responses.

I know some text editing options are available in properties, but not for all situations. It’s weird getting used to not being able to do my own data preparation and having to plan a lot in advance in order to best utilize our developers’ time and anticipate text fields I might need, since I barely know what I’m doing yet myself!

No problem, but I just corrected my post because I think I meant Pivot, not Unpivot (I always get those two confused!)

You’re right there are some situations that text properties with keywords aren’t available, although I can only think of a table’s row headers and a chart’s axis labels. It may work at least in some cases to re-visualize a row header column to a ‘flat’ column which has customizable text.