How to get latest unique value?

  • 23 August 2020
  • 2 replies

Let’s say there is an app that has a toggle switch (ON/OFF). A user can toggle the switch multiple times. I log all the toggle actions, so I know when a user toggles it ON and OFF.

I would like to know how many users’ switch is currently ON. So, I’m not interested in the past, I’m only interested in the latest state of the switch.

If the “unique” data function is used, the result shows whether the user has toggle it ON some day, but it doesn’t tell whether it’s currently ON.

So, I would like to query “unique” but it would only take the latest toggle action of the user. 

How could I do query like that, “latest unique” ? :)

2 replies

Userlevel 2
Badge +1

Hello :) 

Could you store it inside people properties instead? Would make it easier.

Yeah it could work! Good idea!

Nevertheless, the more optimal one would be still find “the latest unique” value.  The event with newest creation time etc.

Anyone idea is possible to do implement? :)