Calculating percentages while grouping

I'm trying to get % for each group in addition to count

From this :

File    User     Rating (1-5)
------------------------------
00001    1        3
00002    1        4
00003    2        2
00004    3        5
00005    4        3
00005    3        2

To this :


User    Rating   Count   Percentage
-----------------------------------
1       1         3      .18
1       2         6      .35
1       3         8      .47
2       5         12     .75
2       3         4      .25

Is there a way to do it ? I only achieved to get the count

Thx in advance

Not in Metabase itself. Depending upon the database, you could use Window functions.

Quack !

1 Like