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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Six Week Average Appearing in each Row

Hi all,

 

I work in the retail space and have a matrix that displays "region" number and "district" number and "store" number as my rows.

 

In the columns portion of my matrix, I have the fiscal period.

 

In the values portion of my matrix, I have a published on time calculation that is working correctly.


What I have been asked to do is place two additional columns (as rows) next to "store" for a 6 week average and a YTD average.

 

I have a "6_Wk_Avg" column pulling in only the values for the last 6 weeks.

I have a "ytd_avg" column pulling in only the values for YTD.

I have a "6WEEK COUNTER" column placing a 1 in cells that are in the last 6 weeks.

I have a "YTD COUNTER" column placing a 1 in cells that are in the YTD.

 

I was thinking of taking the SUM of 6_Wk_Avg / SUM of "6WEEK COUNTER" in power query to get a value I could use as a row since all values would be the same at the store level. A snapshot of my data is below - does anyone have any experience in providing SUM numbers before value calculations in a Power BI matrix?

 

RegionDistrictStoreWeek Start DatePublished On TimePre Publication EditsBO_WkSource_BO_WkSource_BO_Wk Minus 5TodayPublished On Time - Number6_Wk_Avgytd_avgWeek NumberCountYTD COUNTER6 WEEK COUNTER
2857725985/8/20221982022202022202022155/4/202211120111
10867126015/8/2022102022202022202022155/4/202211120111
2865826035/8/20221232022202022202022155/4/202211120111
12854826045/8/202211332022202022202022155/4/202211120111
10866526055/8/202212542022202022202022155/4/202211120111
8863126175/8/20221632022202022202022155/4/202211120111
10865526195/8/20221592022202022202022155/4/202211120111

 

1 REPLY 1
Hei_aQing
Helper I
Helper I

Hi @Anonymous ,

 

Not very clear, Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

 

 

Helpful resources

Announcements
December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.