# Percentage of values in a column

Member

Hello,

In the beast mode how should I get the percentage of column totals like below, 50 hours worked is the 12 percent of the total hours (410). I need to create a column like % Hours so that I can make further calculated fields based upon that.

Provider

Hours worked

Total Tickets

% Hours

% Tickets

John

50

20

0.12

0.10

David

60

30

0.15

0.15

Mark

100

50

0.24

0.25

Antony

200

100

0.49

0.50

Tagged:

• Coach

@agolla2 you can use a window function to achieve this.

```SUM(SUM(value)) over ()
```

Then you can use that as an input in another beast mode (you could also combine these all into 1 beast mode). Best to separate it out if you will be using it in other calculations.

```SUM(value)/total_hours
```

Which can then be used to generate your desired output.

A couple things to keep in mind. This window function calculates the total over all data. If you need to split by group, you'll need to make use of the PARTITION BY argument.

You can use the same approach to calculate % of tickets.

David Cunningham

** Did this solve your problem? Accept it as a solution! ✔️**

• Coach

@agolla2 you can use a window function to achieve this.

```SUM(SUM(value)) over ()
```

Then you can use that as an input in another beast mode (you could also combine these all into 1 beast mode). Best to separate it out if you will be using it in other calculations.

```SUM(value)/total_hours
```

Which can then be used to generate your desired output.

A couple things to keep in mind. This window function calculates the total over all data. If you need to split by group, you'll need to make use of the PARTITION BY argument.

You can use the same approach to calculate % of tickets.

David Cunningham