Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

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.

please do help.

Thanks,

Pramod

1 Solution

Accepted Solutions

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))


talk is cheap, supply exceeds demand
7 Replies

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))


talk is cheap, supply exceeds demand
Not applicable

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

Not applicable

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

Not applicable

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.


Please help to do that.





Untitled.png



Thanks,

Pramod

Re: max count day in a week

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


talk is cheap, supply exceeds demand
Not applicable

Re: max count day in a week

Hi Gysbert Wassenaar,


how it is done?

explain briefly?


Thanks,

Pramod

Not applicable

Re: max count day in a week

Hi Gysbert Wassenaar,


Thanks a lot i got it.


Thanks,

Pramod

Community Browser