Skip to main content
Solved

How to compare two event properties in a chart's where clause

  • November 30, 2021
  • 4 replies
  • 1543 views

Forum|alt.badge.img

Hi, 

I am trying to create a segmentation chart where I filter out events in which two different event properties are equal; an equivalent SQL filter would be WHERE event_prop1 <> event_prop2. Is something like this possible?

 

 

Best answer by Saish Redkar

Hey @lance

Afaik, Amplitude currently doesn’t support direct comparison between different event properties on a given event. We can only use the comparison for the actual property values like event_prop1 = ‘stringABC”.

The closest thing possible which I have used to comparing two event properties in Amplitude in some context is the relative count feature in a cohort as follows. Not sure if this will help you in your case

 

Let me know if I have interpreted your use case correctly. Hope this helps.

View original
Did this topic help you find an answer to your question?

4 replies

Saish Redkar
Expert
Forum|alt.badge.img+10
  • Expert
  • 1377 replies
  • Answer
  • December 1, 2021

Hey @lance

Afaik, Amplitude currently doesn’t support direct comparison between different event properties on a given event. We can only use the comparison for the actual property values like event_prop1 = ‘stringABC”.

The closest thing possible which I have used to comparing two event properties in Amplitude in some context is the relative count feature in a cohort as follows. Not sure if this will help you in your case

 

Let me know if I have interpreted your use case correctly. Hope this helps.


Forum|alt.badge.img
  • Author
  • Novice
  • 4 replies
  • December 6, 2021

Thanks @Saish Redkar, i’ll give this a try!


  • New Member
  • 1 reply
  • September 15, 2024

Hi @Saish Redkar ,

Does Amplitude still not support direct comparison between different event properties? I want to subtract one property value from another and see the difference, and I saw that this was an issue two years ago.

Thanks!


Forum|alt.badge.img+1
  • Experienced
  • 13 replies
  • March 19, 2025

A workaround is using computed properties (if available) or creating a custom event with the comparison already applied. Another option is exporting the data and doing the comparison in a BI tool or database.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings