Skip to main content
Heku_
Level 5
Apr 5, 2023 7:54 AM UTC
Solved

Create variables in the query expression editor

I have this expression, and i would like to move (openCount*100/deliveryCount) to a variable in that expression to make it more efficient. Is there any way to do that?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
ParthaSarathy
ParthaSarathyAccepted solution
Community Advisor
Apr 5, 2023 8:14 AM UTC

You can create a variable (openCount*100/deliveryCount) in query 'Add data' and give an alias to it (eg, @countCalculation).

After query, use an enrichment activity, Add data > here you can use the previously created variable, (eg, Iif(@countCalculation>40,'abc','xyz'))

~  ParthaSarathy S

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
Apr 5, 2023 8:14 AM UTC

You can create a variable (openCount*100/deliveryCount) in query 'Add data' and give an alias to it (eg, @countCalculation).

After query, use an enrichment activity, Add data > here you can use the previously created variable, (eg, Iif(@countCalculation>40,'abc','xyz'))

Translate
~  ParthaSarathy S