Lesser than Function on Looks

Hi all,

I would like to use the "Lesser Than" feature on my looks.

To explain myself, my company is making a change in our database for 2021, so I have to make a report with all the data for 2020 (data is orders)

To do this, I want to filter with the order number, take the last order number from 2020 and use the function Lesser than, like: <13243565

I can't use date, the only solution for me is to use the order number.

I thought I would be able to do it with the attribute "matches advanced" but I couldn't

Do you have any idea how i can do this ?

Thanks in advance,

Kind regards

0 1 112
1 REPLY 1

Hi @Mathis1 

Would you be able to use a sql_always_where parameter on the explore level? This allows you to apply a query restriction that users cannot change on the explore level. You could create a dimension that grabs the highest order id from 2020 and set that as the value (I was generally thinking of a sub query for this, but it could be done with other methods). Then, you can reference this dimension in the sql_always_where if you do not want to hard code the order number.

Please let me know if you have any questions.

Thanks,

Eric

Top Labels in this Space