Calculated metrics IF Statement Error CJA | Community
Skip to main content
Level 2
February 3, 2026
Question

Calculated metrics IF Statement Error CJA

  • February 3, 2026
  • 2 replies
  • 15 views

 

Hi I am trying to create a simple calculated metric but i keep getting the error above. All i am wanting to do is create a metric where if Feedback status = sent make it 1 else 0.

 

I have followed all the steps with the documentation but still get the a valid definition is required error

2 replies

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
February 3, 2026

You will need to drop a metric in your blue segment definition, like People, Events or Sessions.
Or you drop in one of your custom metrics that you capture your events with.

Cheers from Switzerland!
DavenPrAuthor
Level 2
February 3, 2026

Thank you so much this helped me immensely 

Harveer_SinghGi1
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
February 3, 2026

Hi ​@DavenPr ,
​​​​Adding on t​@bjoern__koth has said, you need to create a value or expression that can be evaluated to TRUE or FALSE within the logical_test container. Right now what you have done is added a filter to evaluate that expression only only those events where “Feedback status = sent”, but the evaluation expression is still missing.

Based on the requirement you shared it looks like you want to check the events where “Feedback status = sent” and return 1 if true else return 0. For this you can simply add the expression as below in the logical_test container,

This is how this definition reads in comparison to what you have created,


Updated Def - For Events where Feedback status = sent set Value = 1 else set Value = 0

Your Def - For ___ where Feedback status = sent set Value = 1 else set Value = 0

 

That blank in your definition is what is missing and throwing the error.

Cheers!

DavenPrAuthor
Level 2
February 3, 2026

Thanks so much i am new to cja and this was helpful