Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
I have been working on a Power BI report that calculates weighted averages across business locations and location groups in a matrix. The location group and location columns are placed in the row section. While the measure I’m currently using accurately calculates the location averages, the location group averages are incorrect.
The following measure returns the correct location averages:
DAX Setup Days = CALCULATE( AVERAGE('CGM'[DeliveryDays]), KEEPFILTERS('CGM'[Deliverydate] >= DATE(2025, 3, 1)), KEEPFILTERS('CGM'[Deliverydate] <= DATE(2026, 2, 28)) )
The averages and number of deliveries for each location are as follows:
- Location 1: Average = 36, Deliveries = 1
- Location 2: Average = 17.03, Deliveries = 34
- Location 3: Average = 16.50, Deliveries = 14
- Location 4: Average = 17.86, Deliveries = 29
The correct average for the location group is 17.49, which I verified in an Excel file. There was also an additional location with a zero average included in the Excel. However, my measure returned an average of 16.95 for the location group.
I would appreciate any help you can provide to resolve this issue.
Hi @ReginaP,
Can you please confirm whether you have resolved issue. If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. This will be helpful for other community members who have similar problems to solve it faster.
Hi @ReginaP,
I wanted to check if you had the opportunity to follow up on our previous conversation. If yes can you please provide the sample data so that we can provide you with the accurate and correct solution.
Please feel free to contact us if you have any further questions.
Thank you.
Hi @ReginaP ,
as @samratpbi asked, please provide data sample (in a usable format, not an image) and images of the issue + snapsho of the data model.
IN any case, the issue seems due to the granularity of your iternations, we need to fix that in the DAX expression
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Hi, can you please provide some sample data and what calculation you are trying to achieve? Also I can see there is hard coded date in your measure? Is it expected? may be you can make it dynamic.
Thanks