round the percent | Community
Skip to main content
Level 5
June 10, 2024
Solved

round the percent

  • June 10, 2024
  • 2 replies
  • 1111 views

Hi team, 

 

Is there a way to round the decimal points for the function below:

(percent([indicators/@estimatedRecipientOpen],[indicators/@successWithoutSeeds]))*100

I tried adding round:

round((percent([indicators/@estimatedRecipientOpen],[indicators/@successWithoutSeeds]))*100, 2)

but it throws an error saying that the round function requires 2 or 3 arguments. Please suggest how I can achieve this.

<node expr="(percent([indicators/@estimatedRecipientOpen],[indicators/@successWithoutSeeds]))*100" alias="@OpenRate"/>

Thank you in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by rvnth

Hi @lakshmipravallika,

Could you please help @rvnth further here?

Thanks!


Hi @sukrity_wadhwa ,

 

I was able to sort this out by using the below expression:

<node expr="ToInteger((Percent([indicators/@estimatedRecipientOpen],[indicators/@successWithoutSeeds]))*1000)/10" alias="@OpenRate"/> <node expr="ToInteger((Percent([indicators/@recipientClick], [indicators/@estimatedRecipientOpen]))*1000)/10" alias="@ClickRate"/>

Thank you

2 replies

CampaignerForLife
Level 5
June 10, 2024

Try using this expresion in the expr field

Round(<number>, <number of decimals>)

 

Source:
https://experienceleague.adobe.com/en/docs/campaign-standard/using/managing-processes-and-data/filtering-data/list-of-functions

LakshmiPravallika
Community Advisor
Community Advisor
June 10, 2024

hHi @rvnth ,

 

Please try this way and let me know if it works

 

Round((Percent([indicators/@estimatedRecipientOpen],[indicators/@successWithoutSeeds]))*100, 2)

 

Regards,

Pravallika.

rvnthAuthor
Level 5
June 11, 2024

Hi @lakshmipravallika ,

 

Thank you. It worked, but for one delivery, the decimal is still not rounding off to two decimal places. Please advise.

 

 

 

Sukrity_Wadhwa
Community Manager
Community Manager
July 9, 2024

Hi @lakshmipravallika,

Could you please help @rvnth further here?

Thanks!

Sukrity Wadhwa