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

How to calculate avg

Hi,

 

Can you guide me how to calculate avg as per below data. i want dax to calculate avg from 21 march to 27 march.

 

 

                
       21-Mar-2222-Mar-2223-Mar-2224-Mar-2225-Mar-2226-Mar-2227-Mar-22Week 13Avg. Week 13

 

      2082072072052042032031437 

@PowerBI 

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

You need to preprocess the data in  ‘Transfor data’ as below:

1.use headers as first row

1.png

2.Transpose this new table and rename columns

2.png

3.png

After processing the above data, you can calculate the average using the following formula:

 

Measure = CALCULATE(AVERAGE('Table'[Value]),FILTER('Table','Table'[Date]>=DATE(2022,3,21)&&'Table'[Date]<=DATE(2022,3,27)))

 

Best Regards,
Community Support Team _ Eason

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thanks

v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

You need to preprocess the data in  ‘Transfor data’ as below:

1.use headers as first row

1.png

2.Transpose this new table and rename columns

2.png

3.png

After processing the above data, you can calculate the average using the following formula:

 

Measure = CALCULATE(AVERAGE('Table'[Value]),FILTER('Table','Table'[Date]>=DATE(2022,3,21)&&'Table'[Date]<=DATE(2022,3,27)))

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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