You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "ab291478089 (via GitHub)" <gi...@apache.org> on 2023/04/03 11:50:19 UTC

[GitHub] [superset] ab291478089 opened a new issue, #23560: Pivot Table show columns total question

ab291478089 opened a new issue, #23560:
URL: https://github.com/apache/superset/issues/23560

   A clear and concise description of what the bug is.
   
   #### How to reproduce the bug
   
   1. As shown in the screenshot,the total calculation involving rates is not what is expected.
   
   ### Expected results
    total calculation  is sum(num_boys)* 1.0 / sum(num) no groupby
   
   ### Actual results
   
   what actually happens.
   
   #### Screenshots
   ![image](https://user-images.githubusercontent.com/48116873/229499533-7d8971fd-f5d6-4733-8464-d2fc457254f4.png)
   
   If applicable, add screenshots to help explain your problem.
   
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version:
   - superset version: `superset version`
   - python version: `python --version`
   - node.js version: `node -v`
   - any feature flags active:
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [ ] I have reproduced the issue with at least the latest released version of superset.
   - [ ] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   Add any other context about the problem here.
   


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] pandinug commented on issue #23560: Pivot Table show columns total question

Posted by "pandinug (via GitHub)" <gi...@apache.org>.
pandinug commented on issue #23560:
URL: https://github.com/apache/superset/issues/23560#issuecomment-1500470870

   I have this exact same question too and because of this am not using the Pivot table chart as much as I would like, at least not for percentages or averages.
   
   The expected result would be that the resulting number in the totals row would follow the same calculation as the other rows. 
   So sum(num_boys) / sum(num) should show the total percentage boys over all states (around 60% I would guess) and not the sum of the percentage of all rows.
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rusackas commented on issue #23560: Pivot Table show columns total question

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #23560:
URL: https://github.com/apache/superset/issues/23560#issuecomment-1500432980

   Could you elaborate on the expected behavior here? I didn't break out the calculator, but at a glance, the math all looks correct to me, even if the column formats are perhaps undesirable (only the third column is actually a percentage, really). The sums look accurate too, even if summing percentages is an odd thing to do. 


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] mtthsbrr commented on issue #23560: Pivot Table show columns total question

Posted by "mtthsbrr (via GitHub)" <gi...@apache.org>.
mtthsbrr commented on issue #23560:
URL: https://github.com/apache/superset/issues/23560#issuecomment-1737040665

   Linking a similar issue: https://github.com/apache/superset/issues/16952. Also no solution unfortunately.
   
   FWIW I found the "Table" chart producing the correct/expected values in "Total". Getting this also in the Pivot Table chart would still be very desirable.
   
   ![image](https://github.com/apache/superset/assets/49281986/690b0527-c072-4c46-a9a6-2e4a6df01691)


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] ShubhamDalmia commented on issue #23560: Pivot Table show columns total question

Posted by "ShubhamDalmia (via GitHub)" <gi...@apache.org>.
ShubhamDalmia commented on issue #23560:
URL: https://github.com/apache/superset/issues/23560#issuecomment-1505603409

   Even I'm facing the same issue. Ratio / Percentage values are non-aggregatable (nonag or nag) values and as mentioned in the screenshot, 657.67 % is not the correct value, because what we're trying to calculate is percentage out of 100.
   Example : 
   
   Speed = Distance / Time
   
   Speed Distance Time
   10		100		10
   25     	100		4
   
   TOTAL : (INCORRECT)(AS PER SUPERSET)
   35      200     14
   
   TOTAL : (CORRECT)
   14.28      200     14


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Pivot Table show columns total question [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #23560:
URL: https://github.com/apache/superset/issues/23560#issuecomment-2005106002

   It's been six months since this thread was last commented on, so it's at risk of being closed as stale. PRs welcome, of course, but it would be great to at least get confirmation that this is still happening on Superset 3.x or newer to keep it open, since we no longer support 2.0.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Pivot Table show columns total question [superset]

Posted by "ppalyafari (via GitHub)" <gi...@apache.org>.
ppalyafari commented on issue #23560:
URL: https://github.com/apache/superset/issues/23560#issuecomment-2028778500

   > It's been six months since this thread was last commented on, so it's at risk of being closed as stale. PRs welcome, of course, but it would be great to at least get confirmation that this is still happening on Superset 3.x or newer to keep it open, since we no longer support 2.0.
   
   Hello! This is still an issue in Superset 3.x, and this problem has actually been popping up in the past, just to link a few:
   
   #20076 
   #16952 
   #18548 
   
   As I was looking for a workaround, I bumped into a thread in the Slack channel, where @ETselikov shared a list of their Superset modifications, and this was on the list:
   
   "New total/subtotal calculation mode which will calculate values via a separate query. This is mostly used for percentage metrics for which it is not possible to calculate totals by simply aggregating rows in a table."
   
   I've read the thread and there was a discussion about sharing some of their modifications with the community, but the last comment on that thread was 4 months ago, so no idea what was discussed after that. If anyone knows anything about this, please share! I guess it wouldn't make sense to start working on this feature if it is going to be contributed.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Pivot Table show columns total question [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #23560:
URL: https://github.com/apache/superset/issues/23560#issuecomment-2033161466

   I'm not sure if @ETselikov is planning to contribute this or not, but surely it would be a much-welcomed PR :) 


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] pandinug commented on issue #23560: Pivot Table show columns total question

Posted by "pandinug (via GitHub)" <gi...@apache.org>.
pandinug commented on issue #23560:
URL: https://github.com/apache/superset/issues/23560#issuecomment-1505645144

   The interesting thing here is that the Table viz total row does correctly calculate these metrics, so the behavior on the Pivot table seems to be designed this way for a reason.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] ab291478089 commented on issue #23560: Pivot Table show columns total question

Posted by "ab291478089 (via GitHub)" <gi...@apache.org>.
ab291478089 commented on issue #23560:
URL: https://github.com/apache/superset/issues/23560#issuecomment-1502562494

   > Could you elaborate on the expected behavior here? I didn't break out the calculator, but at a glance, the math all looks correct to me, even if the column formats are perhaps undesirable (only the third column is actually a percentage, really). The sums look accurate too, even if summing percentages is an odd thing to do.
   
   Yes, I expect the same result as my friend downstairs.    I have this exact same question too and because of this am not using the Pivot table chart as much as I would like, at least not for percentages or averages.
   
   The expected result would be that the resulting number in the totals row would follow the same calculation as the other rows.
   So sum(num_boys) / sum(num) should show the total percentage boys over all states (around 60% I would guess) and not the sum of the percentage of all rows.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] ShubhamDalmia commented on issue #23560: Pivot Table show columns total question

Posted by "ShubhamDalmia (via GitHub)" <gi...@apache.org>.
ShubhamDalmia commented on issue #23560:
URL: https://github.com/apache/superset/issues/23560#issuecomment-1505833660

   As per my basic investigation, when it is Table viz, the Total is calculated from the backend and comes as API response from the /chart/data endpoint.
   Whereas, in case of Pivot viz, the total is being calculated in the frontend itself when the "Show Column Total" checkBox is clicked. The data coming from /chart/data endpoint is just granular data, and sum is being calculated in frontend.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] alexanderdrobyshev commented on issue #23560: Pivot Table show columns total question

Posted by "alexanderdrobyshev (via GitHub)" <gi...@apache.org>.
alexanderdrobyshev commented on issue #23560:
URL: https://github.com/apache/superset/issues/23560#issuecomment-1664414534

   Has anyone found a solution to this?


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Pivot Table show columns total question [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #23560:
URL: https://github.com/apache/superset/issues/23560#issuecomment-2033162620

   ...or @TechAuditBI for that matter...


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org