Philippe Hébert
04/18/2022, 10:49 PMProduct category | Revenues ($) | % of total (%) |
X |. 3000 | 25 |
Y |. 4500 | 37.5 |
Z |. 1500 | 12.5 |
W |. 1500 | 12.5 |
U |. 1500 | 12.5 |
Assume Revenues ($) is a metric and cannot be simplified to SUM(Revenues)Jakub Sterba
04/18/2022, 11:18 PMSELECT Revenue($)/ (SELECT Revenue($) BY ALL OTHER)
If you add additional column (e.g. Year) and you will want to see percentage of product category for each Year and not percentage of revenue for all the years you have to use slightly different MAQL:
SELECT Revenue($)/ (SELECT Revenue($) BY ALL Product category)
Jakub Sterba
04/18/2022, 11:40 PMPhilippe Hébert
04/19/2022, 3:23 PM