Display Months Vs Days

HI I am playing with looker in creating different views/looks,  I have a table that I currently working where when I try to show the Tenure of an employee looker is returning the data in Days  where as I would like to see the data displayed as Months/Year 

For example here’s what I have in a table

Name                  Tenure Today

John Doe            400

I would like to this to display as 

Name                 Tenure Today

John Doe           1.1 Year

Solved Solved
0 1 216
1 ACCEPTED SOLUTION

leobardor
Participant V

Hi Momo,

It looks like you may need a new dimension in your LookML to do the trick.

Please find the following steps in this example to achieve the desired output.

1.- Create two dimensions as it is shown in the example, these 2 dimensions have the following purpose:

employee_tenure_in_years:  get the conversion of days to years. This is a number type dimension

employee_tenure_in_yeats_with_label:  add the label “year(s)” to the dimension1. This is a string type dimension

aae8a3f8-874c-41f5-b031-8beded3b0302.png

2.- Save all changes in your LookML and open an explore to see the output:

 (Please see the green rectangle in this screenshot 😞

5f76161b-3795-44aa-bfd7-f2787eb0c8bb.png

Hope it helps!

Best regards,

Leo

View solution in original post

1 REPLY 1

leobardor
Participant V

Hi Momo,

It looks like you may need a new dimension in your LookML to do the trick.

Please find the following steps in this example to achieve the desired output.

1.- Create two dimensions as it is shown in the example, these 2 dimensions have the following purpose:

employee_tenure_in_years:  get the conversion of days to years. This is a number type dimension

employee_tenure_in_yeats_with_label:  add the label “year(s)” to the dimension1. This is a string type dimension

aae8a3f8-874c-41f5-b031-8beded3b0302.png

2.- Save all changes in your LookML and open an explore to see the output:

 (Please see the green rectangle in this screenshot 😞

5f76161b-3795-44aa-bfd7-f2787eb0c8bb.png

Hope it helps!

Best regards,

Leo

Top Labels in this Space
Top Solution Authors