7 Replies Latest reply: May 19, 2015 9:43 AM by Kumar Pramod

# max count day in a week

hi all,

I have attached a dataset from that i need to get the day in which highest completion is done in last week or recent week.

Thanks,

Pramod

• ###### Re: max count day in a week

Try something like this for the maximum count on a day from last week:

=max(aggr(count({<date_completed={">=\$(=date(max(date_completed)-6))<=\$(=date(max(date_completed)))"}>}course_completion_id),date_completed))

• ###### Re: max count day in a week

Hi Gysbert Wassenaar,

I'm not getting i am getting the error while loading the data.

The following error occurred:

SQL##f - SqlState: S0022, ErrorCode: 1054, ErrorMsg: [MySQL][ODBC 5.2(a) Driver][mysqld-5.1.73-community]Unknown column 'date' in 'field list'

Actually i need is the highest course completion day in last week.

Thanks,

Pramod

• ###### Re: max count day in a week

Hi Gysbert Wassenaar,

I will explain it briefly,

I am using date as dimension, and sum(course_completed) as measure.

know i need only the day on which course completion count is more in lastweek.

Please feel free if u dint understand. i am stuck with this.

Thanks,

Pramod

• ###### Re: max count day in a week

Hi Gysbert Wassenaar,

I am getting the last 7 days data with the above equation. but i want to display only the date which has highest count.

i have attached the image what i'm getting now. in that image i need to display only the date 08-03-2015.

Thanks,

Pramod

• ###### Re: max count day in a week

Enable Dimension Limits and restrict the date dimension to the 1 Largest value.

• ###### Re: max count day in a week

Hi Gysbert Wassenaar,

how it is done?

explain briefly?

Thanks,

Pramod

• ###### Re: max count day in a week

Hi Gysbert Wassenaar,

Thanks a lot i got it.

Thanks,

Pramod