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
Anonymous
Not applicable

Unique Customer 4 Week Average

DAX help needed.. I am trying to calculate a a 4 week average for unique visitors.. using the 4 weeks prior to the maximum selected YearWeek.

pbi_baller_0-1689006399493.png

In Above selection, it should count uniques for week 36 to week 39 and then divide by 4. However, need a unique count for each week then divide by 4. 

 

DAX I tried:

 

Week Rank = RANKX(ALL(DimDate), DimDate[Rep_Week],, ASC, Dense)//YYYYWW

 

CALCULATE(
AVERAGEX(VALUES(DimDate[Rep_Week]),
CALCULATE(DISTINCTCOUNT(Fact_KPI_Visits[MembershipNumber]),
FILTER(ALL(DimDate), DimDate[Week Rank]>= MAX(DimDate[Week Rank])-5 && DimDate[Week Rank]<= MAX(DimDate[Week Rank])-1 )
)
)
)

 

Any help greatly appreciated

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

In order to better understand your demands and give the right solution, could you please provide some more specific information? such as your desensitized example data and a screenshot of your desired results?

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_Binbin Yu

Anonymous
Not applicable

bump

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.