Show values of 2 measures on a label

  • 28 October 2020
  • 7 replies

I need to perform standart task to show a value on a line chart and percentage diff from previous value. 
I managed to create a calculation to determine difference from previous value but looks like there is no way to use this value  along with measure value.

This is so basic in Tableau and I’m curious if it is possible in Looker?

Here is an example. I need to add % of difference, so the label text is $19,98 (+7,8%)


Appreciate any help on this matter


Best answer by ernesto 28 October 2020, 10:49

Hi @Vitaliy ! Looks like you will need to edit LookML to get multiple values to show in your tooltip, this article should help:

View original

7 replies

Userlevel 4

Hi @Vitaliy ! Looks like you will need to edit LookML to get multiple values to show in your tooltip, this article should help:

Hi @ernesto, thank you for the tip.  

This looks like a workaround but not the solution. Tooltip is a tool to give user extra context. But for those users who expect to see those values on the chart it can be inacceptible. Let’s imagine they are on the go and using smartphone. Tooltip is not the solution for them. 

It there a way to bring this idea to be implemented in future releases? 

Userlevel 4

Hi @Vitaliy - your best bet is to hit “Help → Product Idea?” within Looker and submit a full request from there 


Anyway, I want to stress here that I can’t accept the proposed solutions. 
This is rather workaround which is not acceptable when I’m using mobile version. With mobile it is super inconvenient to use tooltip. 

And I’m bit disappointed that looker staff treats real business need in that way. This feature is something basic in Tableau and PBI. “Change the model” hack is not enough for looker developers and users in 2020. 

Userlevel 7
Badge +1

Thanks for making that clear, @Vitaliy. What Ernesto shared is certainly just a workaround, and I hear you that even if that fit your case it’s an extra step to edit the LookML.

Being fully transparent: We have heard this feedback a few times in the past, but there has always been a fairly simple and quick workaround in place (tooltip) so we haven’t prioritized it highly. We don’t have a one-size-fits-all template for why we accept/decline working on a feature request, but often the existence of a fairly simple workaround leads us to focus instead on key business needs that don’t have any kind of workaround available.


However, you specifically noted that the business need/pain point is related to mobile usage where the workaround doesn’t suffice. This is excellent context that we have not heard before! We just released our mobile app and are expecting & hoping for a lot of mobile adoption. Given that, I’ll take this to the product team and see if we can re-evaluate it. Thanks again for the feedback and for following up— We’ll post any updates here.

Userlevel 2

While not ideal, you could add the % change to the dimension label.

For your example using a line chart for a time series, you’d need to create a string version of the date and use html to include the % change. For example.

  dimension: format_order_week {
    type: string
    sql: ${order_week} ;;
    html: <b> {{value}} </b> <br> {{percent_diff_order_count._rendered_value}}  ;;

You could even do additional formatting like green if increasing or red if decreasing.


If doing for a column or bar chart showing some measure by dimension like displaying user counts by lifetime value group, you could display the counts and/or % of total in the dimension label.

  dimension: formatted_lifetime_value_group {
    type: string
    sql: ${lifetime_value_group} ;;
    html: {{value}} <br> <b> {{ user_count._rendered_value }} </b> ({{percent_of_total_users._rendered_value}})   ;;

You could also add color, font-size and other formatting as necessary:

 html: <a style="color:blue;font-size:14px;"> <b> {{ value }}</b> </a> <br> <b> {{ user_count._rendered_value }} </b> ({{percent_of_total_users._rendered_value}});;



Hey @JenniferThomas ,

I was checking your suggestion and hound the ‘html’ part to show the labelling as helpful, and working for Bar and Line charts.  

Do you have any suggestion how to show that in case of a Pie Chart?

Actually I have a requirement to show both Dollars and Percentage in a Pie Chart - but not finding any solutions. I have posted a question in community as well.