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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
growandgrow
Frequent Visitor

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 @growandgrow ,

 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.