The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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-22 | 22-Mar-22 | 23-Mar-22 | 24-Mar-22 | 25-Mar-22 | 26-Mar-22 | 27-Mar-22 | Week 13 | Avg. Week 13 | |||||||
| 208 | 207 | 207 | 205 | 204 | 203 | 203 | 1437 |
Solved! Go to Solution.
Hi, @Anonymous
You need to preprocess the data in ‘Transfor data’ as below:
1.use headers as first row
2.Transpose this new table and rename columns
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
Thanks
Hi, @Anonymous
You need to preprocess the data in ‘Transfor data’ as below:
1.use headers as first row
2.Transpose this new table and rename columns
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