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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Running Average on a Measure

I need help. I have attached a pbix file. in the file, i would like to create the Table[Measure 2] directly in the Sheet1 table without having to create the calculated table "Table". This is becuase i want to be able to slice and dice the data by vintage, Portfolio, etc.

 

I will really appreciate if someone can help me out. Thanks.   pbix file

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@TeigeGao  Oh! I finally got it! Yay!

 

try =
AVERAGEX (
    CALCULATETABLE (
        GROUPBY (
            'Sheet1',
            'Sheet1'[Loan Life],
            'Sheet1'[Vintage],
            "Denomi"SUMX ( CURRENTGROUP (), 'Sheet1'[ Denominator Column] )
        ),
        FILTER (
            ALLSELECTED ( Sheet1[Loan Life] ),
            ISONORAFTER ( Sheet1[Loan Life], MAX ( Sheet1[Loan Life] )DESC )
        )
    ),
    [Denomi]
)

View solution in original post

3 REPLIES 3
TeigeGao
Solution Sage
Solution Sage

Hi @Anonymous ,

After analysizing your pbix file, my understanding is that you want to average the "Denominator Column" based on the group of "Vintage" and "Loan Life", in this scenario, we can create a measure like below:

Measure =
CALCULATE (
    AVERAGE ( Sheet1[ Denominator Column] ),
    FILTER (
        ALL ( Sheet1[Vintage], Sheet1[Loan Life] ),
        Sheet1[Vintage] = MIN ( Sheet1[Vintage] )
            && Sheet1[Loan Life] = MIN ( Sheet1[Loan Life] )
    )
)

The result will like below:

Snipaste_2019-04-23_15-32-14.png

Best Regards,

Teige

Anonymous
Not applicable

Thanks for responding @TeigeGao  . The result should be the values in Measure 2 before filters/slicers are applied

Capture.JPG

Anonymous
Not applicable

@TeigeGao  Oh! I finally got it! Yay!

 

try =
AVERAGEX (
    CALCULATETABLE (
        GROUPBY (
            'Sheet1',
            'Sheet1'[Loan Life],
            'Sheet1'[Vintage],
            "Denomi"SUMX ( CURRENTGROUP (), 'Sheet1'[ Denominator Column] )
        ),
        FILTER (
            ALLSELECTED ( Sheet1[Loan Life] ),
            ISONORAFTER ( Sheet1[Loan Life], MAX ( Sheet1[Loan Life] )DESC )
        )
    ),
    [Denomi]
)

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.