cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
RickZ86 Frequent Visitor
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:

CitiesMy Measure
Paris22.36
Milan5.33
London11.8
Grand total13.16333

What I want:

 

CitiesMy Measure
Paris22.36
Milan5.33
London11.8
Grand total39.49
2 ACCEPTED SOLUTIONS

Accepted Solutions
Microsoft v-cherch-msft
Microsoft

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.

View solution in original post

RickZ86 Frequent Visitor
Frequent Visitor

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

Thanks a bunch this has done the trick!

😄

View solution in original post

3 REPLIES 3
Microsoft v-cherch-msft
Microsoft

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.

View solution in original post

RickZ86 Frequent Visitor
Frequent Visitor

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

Thanks a bunch this has done the trick!

😄

View solution in original post

Microsoft v-cherch-msft
Microsoft

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.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors