Rename a series name in dashboard LookML

How can we change a series name in LookML code to ultimately change the name in dashboard. 

0 3 37
3 REPLIES 3

Series names are usually the names of the data values. To overwrite these in LookML, your best bet is most likely a CASE WHEN inside the sql parameter.

I'll show you a basic example. Let's assume you have a dimension that looks something like this:

dimension: status {
type: string
sql: ${TABLE}.status ;;
}

Now, let's say the "status" field returns "SUCCESS" as one of its values. But you'd like to change that value to show up as "Completed" instead. Then, you could write that logic into the SQL statement as follows:

dimension: status {
type: string
sql: CASE
WHEN ${TABLE}.status == 'SUCCESS' THEN 'Completed'
ELSE ${TABLE}.status
END ;;
}

I hope this helps!

Hi Sam, Thanks for your response. 

I am sorry, I am not getting it. Let me rephrase my question. I simply need to rename "Formatted Revenue" into "Revenue" for below dashboard only, without changing the name in the data table. 

seeyou_0-1714422074509.png

 

Ah, thanks for the clarification. It looks like you're using a LookML dashboard.

To edit the series labels for LookML dashboards, you'll want to edit the series labels parameter for that dashboard tile! (Or add one if it's not there yet.)