Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Total of measure wrong - average of average

Dear community,

 

I'm having a hard time creating a measure that should do the following:

  • getting the max value grouped by 2 columns
  • getting the average of the calculated max value
  • getting the correct total of the calculated average

As an example I will use the following table:

 

PersonLocationDateSuccess
Person A     Location 1     2021-08-02      0
Person ALocation 22021-08-02  1
Person ALocation 32021-08-021
Person ALocation 32021-08-021
Person ALocation 32021-08-020
Person BLocation 42021-08-021
Person BLocation 42021-08-021
Person BLocation 52021-08-020
Person BLocation 52021-08-020
Person BLocation 62021-08-021
Person CLocation 72021-08-020
Person CLocation 72021-08-021

 

The measure should return the maximum value from the column "Success" grouped by Location and Date.

This means the following values should be user for Person A:

  • Location 1 => Success 0
  • Location 2 => Success 1
  • Location 3 => Success 1 

The average (in percent) of those 3 locations should be 66,67%.

 

My measure looks like this:

Average of Success per Person and Date =
AVERAGEX(
    SUMMARIZE ( 'Fact', 'Fact'[Location], 'Fact'[Date] ),
    CALCULATE(MAX('Fact'[Success])
))

 

When i use this measure within a table visual it shows the correct average per Person but the total is wrong.

The total should be 77,78% (Average of 66,67%, 66,67% and 100%). Unfortunately the visual shows a total of 71,43%. 

 

TobiT_0-1627922473384.png

 

Can anyone help?

 

Thanks in advance

 

 

1 ACCEPTED SOLUTION

Hi,  @Anonymous 

Try to add a new measure as below:

New_Average of Success per Person and Date = 
AVERAGEX (
    SUMMARIZE (
        'Fact',
        'Fact'[Person],
        "Measure1", [Average of Success per Person and Date]
    ),
    [Average of Success per Person and Date]
)

36.png

 

 

Best Regards,
Community Support Team _ Eason

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , I think you need to use person in this , that is part of visual

 

AVERAGEX(
SUMMARIZE ( 'Fact', 'Fact'[person], 'Fact'[Date] ),
CALCULATE(MAX('Fact'[Success])
))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Hi @amitchandak , using the person in the measure leads to another wrong result

Hi,  @Anonymous 

Try to add a new measure as below:

New_Average of Success per Person and Date = 
AVERAGEX (
    SUMMARIZE (
        'Fact',
        'Fact'[Person],
        "Measure1", [Average of Success per Person and Date]
    ),
    [Average of Success per Person and Date]
)

36.png

 

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.