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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Average

Hello, I need a formula that allows me to obtain the average of some data. I can not get that, it only throws me as a final result the sum of the data. In this case, I need the average to appear in Total, which would be 18.

Oxferatus03_0-1687448089864.png

Thank you.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Syndicate_Admin ,

 

I suggest you to try code as below to create a measure.

Measure = 
IF (
    HASONEVALUE ( 'Table'[Colegiador Eycc] ),
    CALCULATE ( SUM ( 'Table'[Totales] ) ),
    AVERAGEX (
        VALUES ( 'Table'[Colegiador Eycc] ),
        CALCULATE ( SUM ( 'Table'[Totales] ) )
    )
)

Result is as below.

vrzhoumsft_0-1687853732943.png

 

Best Regards,
Rico Zhou

 

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

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

Hi, thanks for the help.

Is it possible for data to be consolidated by date? But the result in the final matrix is an average of what is obtained by each record?

I am referring to:

In the following image, a total of 68.47% appears in the first record. But I need it to be the average of the first registration, this is 121.43%, 84.45% and 152.38%. As there is no data in the previous days it is not considered for this case.

Oxferatus03_1-1689343328157.png


For the 5th record, there is only one data that is 81.90% and I want the result to be the same, 81.90% since there is no more data.

And so on.

It's possible?


Thank you.

Syndicate_Admin
Administrator
Administrator

Hi, thanks for the help.

Is it possible for data to be consolidated by date? But the result in the final matrix is an average of what is obtained by each record?

I am referring to:

In the following image, a total of 68.47% appears in the first record. But I need it to be the average of the first registration, this is 121.43%, 84.45% and 152.38%. As there is no data in the previous days it is not considered for this case.

For the 5th record, there is only one data that is 81.90% and I want the result to be the same, 81.90% since there is no more data.

And so on.

Oxferatus03_0-1689343004580.png

It's possible?


Thank you.



Anonymous
Not applicable

Hi @Syndicate_Admin ,

 

I suggest you to try code as below to create a measure.

Measure = 
IF (
    HASONEVALUE ( 'Table'[Colegiador Eycc] ),
    CALCULATE ( SUM ( 'Table'[Totales] ) ),
    AVERAGEX (
        VALUES ( 'Table'[Colegiador Eycc] ),
        CALCULATE ( SUM ( 'Table'[Totales] ) )
    )
)

Result is as below.

vrzhoumsft_0-1687853732943.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Syndicate_Admin , seem like you need Avg of Sum, assuming [Totales] is a measure, create a new measure

 

Averagex(Values(Table[Colegiadoe Eycc]) , [Totales])

 

Avg of Sum : https://youtu.be/cN8AO3_vmlY?t=22980

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors