Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ioannagr
Creator III
Creator III

Average by weekday in line chart

Hi all! 

So i'm faced with a new problem today...

Look, I need to calculate the average of  ids by weekday. 

dimension is weekday in this line chart.

and for measures i tried

avg(aggr(count({<id={"=len(id)=12"}>} id),Weekday) but doesn't give correct results.

sum(aggr(count({<id={"=len(id)=12"}>} id),Weekday)) / count (distinct DayOftheWeek) and doesn't work.

I'm out of ideas... it just calculates the raw count by weekday.

 

Help?

10 Replies
ioannagr
Creator III
Creator III
Author

Hi, @GaryGiles ,  my correct average by month I got when I did 

avg(aggr(count({<id={"=len(id)=12"}>} id), MonthField, Year) )

after trial and error... Do you think this is best practice or could i do something else?