Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
DS1900
Contributor
Contributor

Diagram for meanvalue of participants per day for a month

I have a setup of values in a table that looks like this, but with more rows:

test1:
LOAD * INLINE [
Participant, Date
a, 2020-12-07
a,2020-12-08
a, 2020-12-09
b, 2020-12-07
b, 2020-12-09
c, 2020-12-08
c, 2020-12-09
c, 2020-12-10
d, 2020-12-10
e, 2020-12-07
]
;

I want to make a bar diagram that shows the mean paticipants per day for a whole month. I can count participation per day, but not the mean value for the month.

Labels (1)
1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

One question I would have is if all dates for a month are reflected in your data?  If a date is not in your data, should the number of participants for the day be considered 0, or do you ignore that date for the average?

If all dates that you want to for the mean for each are in your data and you had a bar chart with Month as the dimension, you could use this for your measure:

avg(aggr(count(Participant), Date))

View solution in original post

2 Replies
Ksrinivasan
Specialist
Specialist

hi,

Dim: Date

Measure: Count(Participant)

Ksrinivasan_0-1611665711122.png

ksrinivasan

GaryGiles
Specialist
Specialist

One question I would have is if all dates for a month are reflected in your data?  If a date is not in your data, should the number of participants for the day be considered 0, or do you ignore that date for the average?

If all dates that you want to for the mean for each are in your data and you had a bar chart with Month as the dimension, you could use this for your measure:

avg(aggr(count(Participant), Date))