Bug - Less than operator doesn't work on timestamps

I have two dates and want to filter out all records that happened before one of them

Here are the dates

haydn_smith167_1-1725027922206.png

Here is the custom expression (T1 Check) which is incorrectly returning true

haydn_smith167_2-1725027971605.png

haydn_smith167_3-1725028007999.png

Why does the > operator not work in this case? 

0 3 129
3 REPLIES 3

Hey @haydn_smith-167

I just tried on my end and the operator is working as expected. Its hard to troubleshoot from distance but maybe a few ideas:

a/ have you tried creating a yesno type dimension on LookML directly and how does the result look like there (to rule out that its source based or if there is an error in the calculation at the front end)

b/ are there any timezone conversions happening?

c/ are both dimensions_groups?

d/ how do the source columns look like, is the same datatype set for both groups?

Thanks
Marc

the expression is a case when but the case when doesn't format the date
field into a timestampSo it's not comparing the time

if you update the case when to the a timestamp (as it should be to begin
with) it works


[image: image (157).png]

[image: image (158).png]

I am not sure I understand your comment correctly and I dont see the pictures. If you have to format anything that implies that its not formatted as expected to begin with and should likely be tackled at the datasource, as I suggested before.

Glad its working for you now!

Top Labels in this Space
Top Solution Authors