manojshetty2004 commented on issue #38674:
URL: https://github.com/apache/superset/issues/38674#issuecomment-4148495744

   Hi  @sadpandajoe ,
   
   I was able to reproduce this issue locally and confirm that totals for ratio 
metrics are currently computed as a simple aggregation of displayed values, 
which leads to incorrect results for non-additive metrics.
   
   From what I understand, this happens because the pivot table loses the 
original SQL context (e.g., numerator/denominator) and treats metric outputs as 
plain numeric values during aggregation.
   
   I’d like to explore working on this. A couple of possible approaches I’m 
considering:
   1. Multi-query approach to recompute totals at each aggregation level
   2. Leveraging SQL features like GROUPING SETS (where supported) to compute 
correct totals at the database level
   
   Before proceeding, I’d love to get feedback on whether this aligns with the 
project direction or if there’s any preferred approach for handling 
non-additive metrics in pivot tables.
   
   Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to