cancel
Showing results for
Did you mean:
Frequent Visitor

## Table grand total issue (division generates avg total and not a sum)

Hi All

When I create a measure that calculates a division ("/") between two different numbers and I place it on a Table, I get the average of each result in the Grand Total row.

If I use the +,- or * signs Power Bi will calculate a sum in the total instead.

Can I get this with a divison as well?

My dax is:

My new measure = SUM('CUBE'[column A])/[Measure 1])

FYI: Measure1 is only a "distinct count"

Example of what Power Bi does:

 Cities My Measure Paris 22.36 Milan 5.33 London 11.8 Grand total 13.16333

What I want:

 Cities My Measure Paris 22.36 Milan 5.33 London 11.8 Grand total 39.49
2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team

## Re: Table grand total issue (division generates avg total and not a sum)

Hi @RickZ86

You may try below measure:

```Measure =
IF (
HASONEVALUE ( 'CUBE'[Cities] ),
[My new measure],
SUMX ( VALUES ( 'CUBE'[Cities] ), [My new measure] )
)
```

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor

## Re: Table grand total issue (division generates avg total and not a sum)

Thanks a bunch this has done the trick!

3 REPLIES 3
Community Support Team

## Re: Table grand total issue (division generates avg total and not a sum)

Hi @RickZ86

You may try below measure:

```Measure =
IF (
HASONEVALUE ( 'CUBE'[Cities] ),
[My new measure],
SUMX ( VALUES ( 'CUBE'[Cities] ), [My new measure] )
)
```

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor

## Re: Table grand total issue (division generates avg total and not a sum)

Thanks a bunch this has done the trick!

Community Support Team

## Re: Table grand total issue (division generates avg total and not a sum)

Hi @RickZ86

Kindly mark my answer as a solution if you feel that makes sense.

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.