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! Learn more

Reply
Anonymous
Not applicable

How to achieve running average?

I have the next fact table:

Users

Date

1

01-June-2022

1

01-July-2022

 

 

On my .pbix I have a Year-Month filter…

 

I want to see the “running average” (starting every year at June-01)

 

If JUNE is selected I want to see 1.     (math: 1/1)

If JULY is selected I want to see 1.       (math: 2/2)

If AUGUST is selected I want to see 0,66     (math: 2/3)

If SEPTEMBER is selected I want to see 0,5     (math: 2/4)

 

And so on… how can I achieve this?

 

 

 

 

 

1 REPLY 1
wdx223_Daniel
Super User
Super User

Measure=VAR _tbl=CALCULATETABLE(ADDCOLUMNS(VALUES(DateTable[YearMonth]),"@cnt",CALCULATE(COUNTROWS(UserData)))+0,DateTable[Date]<=MAX(DateTable[Date])) RETURN SUMX(_tbl,[@cnt])/COUNTROWS(_tbl)

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.