You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/03/01 07:58:08 UTC
[GitHub] [superset] villebro commented on issue #4054: Feature Request : currently we can't summarize pivot table/ table as % value of row total/ column total/ grand total
villebro commented on issue #4054:
URL: https://github.com/apache/superset/issues/4054#issuecomment-1055127478
@sahildoshi013 unfortunately it's not yet possible to apply this logic per metric. However, in the meantime, you can create a secondary metric where you apply a window function where you divide your aggregate expression with the total for that row (feel free to customize the window function to your use case):
1. First metric: `COUNT(*)`
2. Second metric: `1.0 * COUNT(*) / SUM(COUNT(*)) OVER ()`
<img width="644" alt="image" src="https://user-images.githubusercontent.com/33317356/156127975-a54f1efe-a573-44eb-ba66-b3f8b716e7ed.png">
--
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