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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Multiple Average Calculation in same row

Hi ,

Am new to this community.

My need is to calculate the average of first 15 workmenship value based on the index column.

If you see the index its starts from 1 to 24 (this no is not static it will change)for domestic bedding and again index starts from 1 for import bedding.

So I have to calculate the average of first fifteen for domestic and the avarage of 15 values must apply to all the domestic bedding i.e till index 24.

Next I have to recalculate the average of first fifteen for import bedding and now the  avarage of 15 values must apply to all the import bedding i.e till index 28.

I have done this calcultion in Excel.I need this to be done in Power BI.

I have attached the full excel sheet.

Please help me to do with this,

Thanks in Advance,

Mohammed Raffi.

Average of 15.JPG

4 REPLIES 4
Anonymous
Not applicable

Can anyone please help me on this.....

Anonymous
Not applicable

Hi @Anonymous ,

Please try to use following measure formula if it works for your requirement:

Measure =
VAR currIndex =
    MAX ( Table[Index] )
VAR maxIndex =
    CALCULATE (
        MAX ( Table[Index] ),
        ALLSELECTED ( Table ),
        VALUES ( Table[Division] ),
        VALUES ( Table[Finance Division] )
    )
VAR _start =
    IF ( maxIndex - currIndex >= 14, currIndex, maxIndex - 14 )
RETURN
    CALCULATE (
        AVERAGE ( Table[Price] ),
        FILTER ( ALLSELECTED ( Table ), [Index] >= _start && [Index] < _start + 15 ),
        VALUES ( Table[Division] ),
        VALUES ( Table[Finance Division] )
    )

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi @Anonymous ,

Actually, your snapshots seems broken. Can you please share more data information to help us clarify your requirement?

How to Get Your Question Answered Quickly

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Average15.JPG

Am new to this community.

My need is to calculate the average of first 15 workmenship value based on the index column.

If you see the index its starts from 1 to 24 (this no is not static it will change)for ABC1 and again index starts from 1 for ABC2.

So I have to calculate the average of first fifteen for ABC1 and the avarage of 15 values must apply to all the ABC1 i.e till index 24.

Next I have to recalculate the average of first fifteen for ABC2 and now the  avarage of 15 values must apply to all the ABC2 i.e till index 28.

I have done this calcultion in Excel.I need this to be done in Power BI.

Please help me to do with this,

Thanks in Advance,

Mohammed Raffi.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors