New Table Visualization - Date/Time Measure Not Displaying (bug?)

PaulM1
Participant III

I think the best way to explain this is through repro steps. Please bear with me. My backend is confined to Snowflake. So I’m not sure if the backend makes a difference.

1.) Create and populate a new table in your Looker connected database:

create table DBO.ZTEST (id int, cdate timestamp_ntz);
insert into DBO.ZTEST (id, cdate) values (1, '2020-01-01');
insert into DBO.ZTEST (id, cdate) values (1, '2020-01-03');
insert into DBO.ZTEST (id, cdate) values (1, '2020-01-05');
insert into DBO.ZTEST (id, cdate) values (1, '2020-01-07');

2.) Create a new Looker View from the new table (I let Looker auto-create mine)

3.) Add the following Measure to the View:

  measure: cdate_measure {
    type: date
    sql: MIN(${TABLE}."CDATE") ;;
    convert_tz: no
    label: "CDate Measure"
  }

4.) Add the View to your Model:

explore: ztest {}

(don’t forget to save the changes to the View & Model)

5.) Navigate the Explore menu, and select the ‘ZTest’ Explore you just created

6.) Add the following fields to the query: “ID” and “CDate Measure”

7.) Run the query

The results should appear as expected with “1/1/2020” in the CDate Measure column:

8.) Expand Visualization

9.) Select the button for the “Table” Visualization

Visualization results should mirror the Data results:

10.) Select the Gear to edit the Visualization

11.) In the Visualization Edit dialog, click the ‘Series’ tab

Notice the value for ‘CDate Measure’ in the Visualization becomes a thick black vertical bar:

This behavior is not present when using the Legacy Table visualization. If you change the Visualization to ‘Table (legacy)’, notice the value for ‘CDate Measure’ returns as expected.

I have tested this with different TYPES for the Measure (date, date_time, time, etc.). They all behave the same. It also doesn’t matter if ‘convert_tz’ is omitted. Finally, I also get this behavior from other Views that I have in production.

My entire ‘ZTEST’ View looks like this:

view: ztest {
  sql_table_name: "DBO"."ZTEST"
    ;;
  drill_fields: [id]

  dimension: id {
    primary_key: yes
    type: number
    sql: ${TABLE}."ID" ;;
  }

  dimension_group: cdate {
    type: time
    timeframes: [
      raw,
      time,
      date,
      week,
      month,
      quarter,
      year
    ]
    sql: ${TABLE}."CDATE" ;;
  }

  measure: cdate_measure {
    type: date
    sql: MIN(${TABLE}."CDATE") ;;
    convert_tz: no
    label: "CDate Measure"
  }

  measure: count {
    type: count
    drill_fields: [id]
  }
}
0 4 595
4 REPLIES 4

Dawid
Participant V

I’ve experienced the same:

@PaulM1 can you double-check that you’ve tested this with type: date_time? From internal testing, date_time should work as expected.

David’s post had the correct assumption: This is a result of Bars working in an unexpected way. We believe this to be fixed now, and you should see it start working as expected upon your next update.

Thanks for reporting!

PaulM1
Participant III

Thank you Izzy.

At the time of my first post, I did confirm that it was occurring with any date type (including date_time). However, as of today, this behavior no longer appears to be happening. Dates are showing as expected.

Thanks again!

Paul

Top Labels in this Space
Top Solution Authors