Advanced Calculated Metrics | Community
Skip to main content
sowmyap94858964
June 22, 2020
Solved

Advanced Calculated Metrics

  • June 22, 2020
  • 1 reply
  • 943 views

Hi,

 

We are tracking two sale values on our e-commerce platform currently -

Final Sale Price - the amount the user paid during checkout

Discount applied - the amount of discount applied to the purchase by the user during checkout

 

so in reporting, when we try to isolate the actual sale value across multiple purchase instances, which is a simple formula of Revenue - Discount, I start seeing negative values which is throwing up a wrong column total. 

 

Example: Final sale price for one instance was 0$ but the discount applied was 99 and so the sales(actual) is being reported as -99$. Is there a smart way to use calculated metrics to solve for these negative values? Wondering if anyone else faces the same issue?

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 kainth

@sowmyap94858964Please try to test the results for the calculated metric when no segment is applied to the Freeform table. Also, try adding the If condition in your calculated metric for example, If Discount is greater than 0 then show value as Revenue - Discount else just show the revenue. For more information on the If condition you can refer to the below documentation link.

 

Link: https://docs.adobe.com/content/help/en/analytics/components/calculated-metrics/calcmetrics-reference/cm-adv-functions.html

Hope this helps.

Regards,

Abhinav

1 reply

kainthAccepted solution
Level 6
June 24, 2020

@sowmyap94858964Please try to test the results for the calculated metric when no segment is applied to the Freeform table. Also, try adding the If condition in your calculated metric for example, If Discount is greater than 0 then show value as Revenue - Discount else just show the revenue. For more information on the If condition you can refer to the below documentation link.

 

Link: https://docs.adobe.com/content/help/en/analytics/components/calculated-metrics/calcmetrics-reference/cm-adv-functions.html

Hope this helps.

Regards,

Abhinav