Skip to main content
Solved

How to handle the division of metrics by empty or null values?

  • Nov 3, 2025 1:34 PM UTC
  • 6 replies
  • 453 views

Forum|alt.badge.img+2

I would like to divide my 'Discount_EUR' metric by my 'Gross Sales EUR' metric, but I'm not getting any value. Can you help me solve this problem? Thank you in advance.

Result:

 

 

Best answer by Jules R

 I found an explanation for my problem; I just needed to use the following formula in my division calculation to get the correct result: Discounts_EUR /Gross_Sales_EUR [REMOVE SUM:SALES_Org,PRODUCT,CURRENCY,CUSTOMER,ACCOUNT,VERSION,Month]*100

 

View original

6 replies

Min Li
Master Helper
Forum|alt.badge.img+14
  • Master Helper
  • Nov 3, 2025 3:40 PM UTC

Could you please check if the metric Discounts and Gross_Sales share the same dimensions?


Forum|alt.badge.img+2
  • Author
  • Author
  • Nov 3, 2025 3:50 PM UTC

Hello, yes, it shares the same dimensions. Thank you for your help.

 


Min Li
Master Helper
Forum|alt.badge.img+14
  • Master Helper
  • Nov 3, 2025 3:59 PM UTC

What does this warning say? Or you may want to lay out the metrics at the very bottom level and make sure there are values from both metrics at the same intersection instead of the aggregation level.
 

 


Forum|alt.badge.img+2
  • Author
  • Author
  • Nov 3, 2025 10:10 PM UTC

I aligned all the Metrics with their s dimension so that Discount and Gross Sales have the same structure; I no longer get an error message, but this does not solve the problem.

 


Min Li
Master Helper
Forum|alt.badge.img+14
  • Master Helper
  • Nov 4, 2025 2:42 PM UTC

Now you have 7 dimensions in your final metric. In your metric of Discount_EUR, I noticed that the customer dimension is not included from your previous screenshot.


Forum|alt.badge.img+2
  • Author
  • Author
  • Answer
  • Nov 13, 2025 4:38 PM UTC

 I found an explanation for my problem; I just needed to use the following formula in my division calculation to get the correct result: Discounts_EUR /Gross_Sales_EUR [REMOVE SUM:SALES_Org,PRODUCT,CURRENCY,CUSTOMER,ACCOUNT,VERSION,Month]*100