I have the columns of a table organized by "Stage." I want to rename the values of the elements within "Stage," but couldn't find how to do so. An example is that I want to rename "Stage A-Reach Agreement" to "Stage A." Thanks for your help
How to change column header labels?
If you just want to change the header text, there are two simple ways to do it:
- Change the caption of the measure:
- Open the Data Analysis Panel for your table
- Edit the measure (click the pencil icon)
- Change the text in the Caption field
This option changes the metric set element, so will be reflected wherever you are using this metric set (for example, you will still see the change after re-visualizing).
- Change the header text:
- Open the Properties panel for the table
- In the Main tab, under Columns, click the relevant column
- In the Text tab, provide you prefered Header Text
This option is on the table itself, and will not reflect on other instances of the same metric set (for example, re-visualizing will undo this change).
Thank you for your reply but I think I am asking for something slightly different. I don't wish to change the name of the header, but rather the names of the elements that would be within that header. For example, I don't wish to change Employee_Name, but rather the elements within Employee_Name, such as changing John Smith to John S or Deborah Pollen to Debbie P
You can acheive that using a Calculated Element transform on the data cube. The step-by-step instructions on the linked article show you how to create an element combining First and Last names, but you can use almost any C# expression. For example, to target your initial question, the following expression checks all entries for the word Research and changes to R&D:
if ($GroupName$.Contains("Research"))
{
return "R&D"
}
else return $GroupName$
Another way to modify the values would be using the String transform (in case you wanted to avoid writing a small expression under the calculated transform). Using the String transfrom, simply choose the "Replace" function and specify the old and new value you would like the users to see:
Here is the result:
Thank you both, got exactly what I needed!