cancel
Showing results for
Did you mean:
Highlighted
Frequent Visitor

## Percentage Sum Total

I would like to write a new measure to calculate the % of the total for the period. I can calculate the sum score for the whole table, but not by the period. Thanks,

Company    Period   Score   % total for the period

A                    Q1       2          16.7%

A                     Q2     3           27.3%

B                    Q1      4           33.3%

B                   Q2       5           45.5%

C                   Q1       6           50%

C                   Q2       3            27.3%

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

## Re: Percentage Sum Total

You may try using ALLSELECTED Function.

```Measure =
DIVIDE (
SUM ( Table1[Score] ),
CALCULATE ( SUM ( Table1[Score] ), ALLSELECTED ( Table1[Company] ) )
)
```
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Super User

## Re: Percentage Sum Total

@siuchan

Hi, try with this measure

```% Total for Period =
VAR TotalPeriod =
CALCULATE ( SUM ( Table1[ Score ] ), ALLEXCEPT ( Table1, Table1[  Period ] ) )
RETURN
DIVIDE ( SUM ( Table1[ Score ] ), TotalPeriod )```

Regards

Victor

Lima - Peru

Proud to be a Datanaut!

Frequent Visitor

## Re: Percentage Sum Total

Thanks for your suggestion. I tried it. But, it gave me the sum of the whole table. only If i specific the time period with the slider, they i can get the total sum % at the specific period.

Community Support Team

## Re: Percentage Sum Total

You may try using ALLSELECTED Function.

```Measure =
DIVIDE (
SUM ( Table1[Score] ),
CALCULATE ( SUM ( Table1[Score] ), ALLSELECTED ( Table1[Company] ) )
)
```
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.