Eliminate Null in the LookML Script itself

Hi Experts, 

I created a dimension, like this which is giving me the right number/Integer, I wanted (8751).. But along with this it also generates a NULL, which I want to eliminate (image below).

How to get rid of the NULL in the Script itself?

dimension: last_12_month_dte_key_num {
    type: number
    sql: CASE WHEN ${time_detail_cv.rfrnc_dte_date} = ${last_12_month_date} THEN ${dte_key_num} END ;;
  }

668ace82-21a1-49dd-a3d4-9cf57f02fb42.png

Later I want to use the above dimension in my Explore, like this below, and get all the ‘dte_key_num’ >= 8751.

view_name: invoice_line_cv {
  view_label: "Invoice Line"
  sql_always_where: ${invoice_line_cv.dte_key_num} >= ${invoice_line_cv.last_12_month_dte_key_num} ;;
}

But the ‘>’ or ‘<’ is not working and everytime only ‘=’ is working, and giving me only one record as 8751 (Image below). Is it because of the above NULL in the previous dimension? 

342f9fdb-2a01-449f-bf78-2eb8547dae95.png

Regards!

0 0 81
0 REPLIES 0
Top Labels in this Space
Top Solution Authors