Forum Discussion
Average
Thank you for your response, I've been on vacation, hence the late response.
Unfortunately this is not the solution.
I have already applied the method you recommend and also incorporated it into the example, this is table 2.
For Monday, PowerBi then divides the number of customers by the product of the number of Mondays and the number of measurement moments).
Do you have another idea?
If you are finding that the averages calculated by PowerBI are not matching the expected averages, it could be because of the way PowerBI handles grouping in aggregations.
One thing that could be causing the issue you're describing is if PowerBI is first calculating an average for each Monday (and for each time slot on Monday, if your data has multiple records per Monday), and then calculating an average of these averages.
To avoid this, you need to create a new calculated column that represents the total number of customers for each day. This will ensure that the average calculated later on is accurate. Here's how you could do it:
Create a New Calculated Column for Day Total
DayTotal = CALCULATE(SUM('YourTable'[Values]), ALLEXCEPT('YourTable', 'YourTable'[Date]))
This formula will sum the 'Values' column for all records that have the same date, effectively giving you the total number of customers for each day.
Create a Measure for Average Per Day
AveragePerDay = AVERAGE('YourTable'[DayTotal])
This will average the 'DayTotal' column, giving you the average number of customers per day.
Create a Visualization
Now you can create a visualization like you did before, using the 'DayOfWeekName' column for the Axis and the new 'AveragePerDay' measure for the Values. This should give you the correct average per weekday.
Let me know if this solution helps, or if there are more specifics to your situation that I didn't account for, I'd be happy to help further.
- Peter323 years agoFrequent VisitorThank you very much. This is the solution i was looking foor.
- rubayatyasmin3 years agoCommunity Champion
Peter32 good to know it helped. I took GPTs help to generate this much detailed info. Figured time saver.
Thanks