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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
CAWizz
Regular Visitor

Weekly Average

Hello, 

 

Any help will be extremely appreciate!

 

I have the following dataset made of a date column, customerID and group_class colomn with categorical datapoints for classifcation as seen below

app_Datecustomergroup_class
20230222record100_0to25999
20230228record200_0to25999
20230207record300_0to25999
20230209record402_30000to34999
20230220record501_26000to29999
20230201record600_0to25999
20230207record700_0to25999
20230204record801_26000to29999
20230226record901_26000to29999
20230208record1003_35000to39999
20230210record1103_35000to39999
20230207record1204_40000to49999
20230203record1301_26000to29999
20230228record1401_26000to29999
20230204record1500_0to25999
20230201record1600_0to25999

 

using the matrix visual, I created a daily distribution view showed as % of row total

CAWizz_0-1687452347372.png

To that, I would like to add another column with a calculated field displaying the average of the % for each group as seen below 

Weekly view01/01/202308/01/202315/01/202322/01/202329/01/2023Average of daily %
00_0to14998%4%   6%
01_1500to174912%14%14%14%16%14%
02_1750to199910%10%10%10%11%10%
03_2000to299939%41%43%44%43%42%
04_3000to499924%24%27%25%24%25%
05_5000to99997%6%7%7%6%7%
2 REPLIES 2
CAWizz
Regular Visitor

Hello, thank you for looking into this! I used the logic you kindly built for me to calclulate the weekly average and weekly standard deviation (population) however when comparing the PBI mesure outputs to the ones calculated in excel using the same dataset, i end up with some discrepency. I will get back to you as soon as this is fixed one my end! thank you

v-jingzhang
Community Support
Community Support

Hi @CAWizz 

 

I guess that your current value field showed as % of row total is based on the count of customerID, right? If so, you can create two measures similar to below, and add only the second measure to the matrix visual. 

Measure = DIVIDE(COUNT('Table (2)'[customer]),CALCULATE(COUNT('Table (2)'[customer]),ALLSELECTED('Table (2)'[category])))
Measure 2 = IF(ISFILTERED('Table (2)'[date]),[Measure],AVERAGEX(VALUES('Table (2)'[date]),[Measure]))

Then in the formatting pane, go to Column subtotals and change the Subtotal label to "Average of daily %". 

vjingzhang_0-1687752750903.png

You will get the following matrix finally. 

vjingzhang_1-1687752888464.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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