Show values of 2 measures on a label

Vitaliy
Participant I

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%)

89f9a17d-86dc-4b31-902b-9020c5a14cf0.png

Appreciate any help on this matter

Solved Solved
0 7 3,904
1 ACCEPTED SOLUTION

Hi @Vitaliy ! Looks like you will need to edit LookML to get multiple values to show in your tooltip, this article should help: https://help.looker.com/hc/en-us/articles/360023508894-Displaying-Values-From-Other-Fields-in-the-To...

View solution in original post

7 REPLIES 7

Hi @Vitaliy ! Looks like you will need to edit LookML to get multiple values to show in your tooltip, this article should help: https://help.looker.com/hc/en-us/articles/360023508894-Displaying-Values-From-Other-Fields-in-the-To...

Vitaliy
Participant I

Hi @ernesto1, 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? 

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

https://community.looker.com/getting-started-1006/feature-requests-how-your-feedback-makes-looker-be...

Vitaliy
Participant I

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. 

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.

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}}  ;;
  }

1a39b7f8-7ebe-4a32-84f5-7667763ab2e4.png

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}});;

d6d9931a-ad0a-400c-bd20-fde7669ecdb3.png

DickyMohanty
Participant III

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. 

https://community.looker.com/dashboards-looks-7/pie-chart-to-show-both-dollars-and-percentage-20890?...

Regards!

Top Labels in this Space
Top Solution Authors