Multiple Comparisons on Single Value

Hello everyone,

As I am using the Single Value visualisation for one of my dashboards, I would like to have move than one row of comparisons value inside one look.

For example:

Cost: 100k 

Comparison #1: 30,1% on MoM
Comparison #2: 10% Above Budget

 

d4db57a9-cd56-4a53-8c87-39d651d46859.png
Mockup
1 3 908
3 REPLIES 3

Dawid
Participant V

Yuo can use html parameter in a measure to do that. It’s quite hacky because you may need to create a copy of the measure with all these specific components of your desired output.

Here is one article that could help: 

https://community.looker.com/lookml-5/using-html-and-liquid-to-create-progress-bars-inside-a-table-v...
 measure: percent_complete {type: number sql: 1.0*(${pages_finished});;

html: <div style="float: left

; width:{{ value | times:100}}%

; background-color: rgba(0,180,0,{{ value | times:100 }})

; text-align:left

; color: #FFFFFF

; border-radius: 5px"> <p style="margin-bottom: 0; margin-left: 4px;">{{ value | times:100 }}%</p>

</div>

<div style="float: left

; width:{{ 1| minus:value | times:100}}%

; background-color: rgba(0,180,0,0.1)

; text-align:right

; border-radius: 5px"> <p style="margin-bottom: 0; margin-left: 0px; color:rgba(0,0,0,0.0" )>{{value}}</p>

</div>

;;

}

Thanks @Dawid . That is a great approach, but unfortunately it doesn’t fit my use case. I am using calculation and merge queries for the final result, and the HTML parameter doesn’t really work.

Dawid
Participant V

Yeah that’s the limitation of such hacks. There are no ways of definining custom visualisations unless you build them from scratch using D3 or other library..

Top Labels in this Space
Top Solution Authors