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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.