top of page
  • Rosablanche

How to create an alias in SAP Analytics Cloud

Updated: Feb 10, 2021

The alias functionality in Tableau is so practical, unfortunately it doesn't exist in SAC. Let's have a look on how we can bridge this gap.


So, what is an alias ?

An alias is an alternate name for a member in a discrete dimension.

For instance, your dimension contains numbers or random codes, but you would like to display a meaningful text in your visuals.

In my example, I'm looking at dataset where you see a list of passengers and in which harbour they've boarded a boat. The locations are identified with a one-letter code: C for Cherbourg; Q for Queenstown; S for Southampton.

Wouldn't it be nice if my visuals were displaying the full name instead of the code ?


It's very easy to do that in Tableau, just right-click and create an alias.



In SAC, We'll have to create a calculated column:

The original dimension is called "Embarked"; the data file is called "train".

IF([d/"train":Embarked]="C", "Cherbourg", IF([d/"train":Embarked]="S", "Southampton", "Queenstown" ) )

It's a bit painful if you have several values. Shame there isn't a function like SWITCH() in DAX available in SAC.



Here's the result:











An alternative way of doing it is to use a measure-based dimension. Leave "Use measure values as dimension members" unticked so you can define your own member names based on the dimension values. See screenshot below.

In this case, we have a ticket class defined with discrete numerical values: 1,2,3. We want to rename this upper, middle and lower class. The granularity of the dataset is a dimension called PassengerId.





Here's the result:

Again, it's a bit painful if you have several values.

6 views0 comments
DSC02405-Edit.jpg

Rosablanche

A BLOG ABOUT ANALYTICS & DATA
bottom of page