Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Advanced Calculated Metrics

Avatar

Level 1

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?

1 Accepted Solution

Avatar

Correct answer by
Level 6

@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...

Hope this helps.

Regards,

Abhinav

View solution in original post

1 Reply

Avatar

Correct answer by
Level 6

@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...

Hope this helps.

Regards,

Abhinav