Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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))
hi,
Dim: Date
Measure: Count(Participant)
ksrinivasan
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))