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

Average weekly sales not calculating correctly.

I have two charts from my own example that can display how you can show the data. The circular chart is meant to display average sales by week compared to actual sales by week. (This helps the users clearly see outlier points which can lead to deeper sales discussions). The chart on the right is a line chart which should also display actual sales vs. average sales. (The average should always be a straight line of which actual sales can be plotted against so that it can be determined which weeks should be of concern if they are not within a particular threshold compared to average weekly sales.

The formula I use for actual sales is: =sales

The formula I use for average sales is: =Sum(TOTAL Sales)/Count(Distinct Week)

My issue is I can not get my average sales to calculate correctly and be dynamic according to the number of weeks selected.

Thanks,

Brandon

9 Replies
sunny_talwar

May be you want to try this:

=Sum(TOTAL Sales)/Count(TOTAL Distinct Week)

krishnacbe
Partner - Specialist III
Partner - Specialist III

Hi,

You can add the Average expression in Reference Line. Please find the attached QVW.

Anonymous
Not applicable
Author

Hi Sunny,

Thanks for the feedback. Unfortunately I have tried that expression earlier before posting this as a topic and I am not receiving the anticipated results.

Anonymous
Not applicable
Author

Krishnapriya I am not seeing your qvw

krishnacbe
Partner - Specialist III
Partner - Specialist III

Reattaching it again.

Anonymous
Not applicable
Author

Hi Sunny, My apologies, I went back and double checked after posting my last comment and this is actually the solution I needed. Thank you for you assistance.

Anonymous
Not applicable
Author

Krishnapriya,

Thanks you solution works as well!

sunny_talwar

Super

Please close the thread by marking correct and helpful responses.

Best,

Sunny

krishnacbe
Partner - Specialist III
Partner - Specialist III

Good to hear, it works. Please mark the helpful/correct answer and close the thread.