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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
CherC
Frequent Visitor

PBI DAX: Add rolling avg instead of subtotal to matrix table with measures for rows

Hi All, have a Power BI DAX question: trying to add another column to this matrix table example. Instead of the column subtotal, I want the average of the previous 6 months, (rolling avg). Each row in the table is a measure. Is there a way to do this?

Screenshot 2023-04-19 092313.png

3 REPLIES 3
Anonymous
Not applicable

Hi @CherC ,

Please have a try.

Create  measures.
Sum measures values.

measure_sum=[measure A]+[measure B]+[measure C]+[measure D]

Then change the measure total value.

measure =
VAR _2 =
    SUMMARIZE ( table, table[date], "aaa", [measure_sum] )
RETURN
    IF ( ISINSCOPE ( table[date] ), [measure_sum], AVERAGEX ( _2, [aaa] ) )

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

So, I created the measures successfully, but since the total column is a built-in feature, where would I put the 2nd measure from above?  Since it's a matrix table, it will only let me put the dates in the column field section and it certainly isn't an extra row.  Is there somewhere to substitute this measure for the total column?

Anonymous
Not applicable

Hi @CherC ,

You only need to put the second measure into the matrix.

Like the following:

vrongtiepmsft_0-1682384456425.png

Solved: How to remove duplicates count - Microsoft Power BI Community

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors