Can I make a customer Filter to display MAX date only?


I have restricted access to looker, basically, I can use the dimensions and measures available without modifying them or adding new ones, so I have a Look for chat conversations and I have a dimension for the Chat Date, then I have a dimension for Message Sent including minutes and seconds and now I would like filter the latest message sent only but I don’t know-how.

I have the Chat identifier, agent name, and message time like this:


And want the Custom Filter to hide all but the last one in the series

Can it be done?

7 replies

Userlevel 6

Order by the dt time field and limit rows to 1

Thanks !

I think I forgot to mention that I have like 50K different Chats and I need to do this for all Chats at the same time

Userlevel 6

If it were me I would edit the model to rank those values and then filter on the ranking, you mentioned you dont have dev access, it’s probably possible with table calculations and hiding rows from the viz but it’s going to be a bit nasty.

Well, I guess I’ll export it and hide it in Power Bi then

thanks !

Hey IanT, I was given access to create Custom Measures and Custom Dimension, will it be more easy to it like this?

Userlevel 6

Im sure its possible yes, you would need to rank them chatID and then limit the viz to show only top rank, if this is straight forward or a messy expression I cant say as I would just get it into the data model without attempting this.

Late to reply, but figured I’d add another solution in case someone wants it.  If you are willing to use a derived table to build the view, you can always do

select *, (select max(date) from MYTABLE) as max_date


and then use max_date = date in a table calculation for your filter.  It’s not idea, but works quickly in a pinch.