# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for
Did you mean:
Highlighted
Specialist III

## Need Week count

Hi all,

I want to calculate the count of  items   of current week  dynamically   how to write the exp?

I have a weeknumber column in data

=count(Item)

1 Solution

Accepted Solutions
Highlighted
MVP

Your expression seems ok and working fine try some of this

=count( {<Flag={1},WeekNumber = {" \$(=max(WeekNumber))"}>} Item)

Or

=count( {<Flag={1},WeekNumber = {" \$(=max(WeekNumber))"}>} [Item])

28 Replies
Highlighted
Specialist III

count({\$<weeknumber={'\$(=max(weeknumber))'}>} Item)

Highlighted
Not applicable

Try this

Count({<weeknumber={\$(=max(weeknumber))}>}Item)

Highlighted
MVP

If your weeknumber field has values like, 1,2,... try like:

=Count({<weeknumber={'\$(=Week(Today()))'}>}Item)

Highlighted
Partner

=count(distinct if(weekweeknumber)=  week(today()),id_produs))

Highlighted
MVP

Try with this expression

=count( {<weeknumber = {" \$(=max( weeknumber  ))"}>} Item)

Highlighted
Specialist III

but,

in my data  weeknumber based on data     I need max of week   based on data     [I don't need based on calendar week]

for example:    in my data  maxweek is   30       so I need to show count of item of 30th week

weeknumber            ---- this is not calendar week

30

29

Highlighted
MVP

Let me know the field weeknumber is string field if not by this statement =max( weeknumber  ) you get Max weeknumber that is 30 if they are number.

Highlighted
Specialist III

yes,its number Anand,

in text object    =max(weeknumber) showing 30.

in chart expression  I have like this

Count({<Flag={1}>} Item)

I tried below

=count( {<Flag={1},WeekNumber = {" \$(=max(WeekNumber))"}>} Item])   its not working

Highlighted
MVP

May be you need to remove the additional square bracket around Item?

=Count({<Flag = {1}, WeekNumber = {" \$(=max(WeekNumber))"}>} Item])

So, use it like this

=Count({<Flag = {1}, WeekNumber = {" \$(=max(WeekNumber))"}>} Item)