Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ziabobaz
Creator III
Creator III

bar chart with averages per day of week

Hi, I am trying to build a bar chart with average sales per day of the week for the chosen period, but my formula returns Sales (not Average sales). What is wrong? Thank you!


avg(

aggr( Sum(Sales), [DayOfWeek_Field] )

)         

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

May be like this

Avg(Aggr(Sum(Sales), DayField))

View solution in original post

9 Replies
OmarBenSalem
Partner
Partner

maybe, as dimension, put DayOfWeek_Field and as a measure:Avg(Sales)?

sunny_talwar

Are you doing this in a text box object or a table?

OmarBenSalem
Partner
Partner

Bar chart..

sunny_talwar

That's right... just totally ignored the title of the post

ziabobaz
Creator III
Creator III
Author

it's not working

Screenshot_52.jpg

OmarBenSalem
Partner
Partner

What do you excpect as a result?

sunny_talwar

May be like this

Avg(Aggr(Sum(Sales), DayField))

View solution in original post

ziabobaz
Creator III
Creator III
Author

Average sales by day of week:

Screenshot_53.jpg

If i choose March, it should return Sum(<Monday> Sales)/count(<Monday> DaysOfWeek) and put it in the first Bar.

BTW, this works form me - I just wanted to apply a nicer solution.

ziabobaz
Creator III
Creator III
Author

Solved.

I think I got the logic.

I tried to split by DayOfWeek in the formula but as long as it is already done by setting a Dimension, the [Date] field in the formula will suffice.

Thank you!