Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Abhi999
Contributor III
Contributor III

Lastest week count

Could some one help me on below query.

 

I want to count of orders weekly based on max in date field.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

If you have a week field(if you don't, create it in the script using week()), you can try like:

Count({<Week={'$(=Max(Week))'}>}OrderID)

View solution in original post

3 Replies
tresesco
MVP
MVP

You have given not much information. With that; you may try something like:

Dim : Week

Exp : FirstSortedValue(Aggr(Count(Distinct OrderID), Week, Date), -Date)

Abhi999
Contributor III
Contributor III
Author

Hi Tresesco, I am using KPI to show latest week , based max available date. 

Ex: I have data only upto last Monday, so I want calculate orders of last week. 

tresesco
MVP
MVP

If you have a week field(if you don't, create it in the script using week()), you can try like:

Count({<Week={'$(=Max(Week))'}>}OrderID)