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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavvibudagam
Creator II
Creator II

Set analysis

Hi Experts,

Can any one please help me on below requirement.

I have a Due date field in DD/MM/YYYY format. From that field based on Weekday need to derive the below Measure.

Count(Distinct issuenum) where duedate>= start of week(Monday) and <=end of week(sunday)

how to add the where condition on set analysis. Please help me on this.

Thanks in advance.

1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III

I think you need a max here

Count(DISTINCT{<DueDate ={">=$(=Date(WeekStart(Max(DueDate),0,0),'MM/DD/YYYY'))<=$(=Date(Weekend(Max(DueDate),0,0),'MM/DD/YYYY'))"}>}issuenum)

View solution in original post

15 Replies
qv_testing
Specialist II
Specialist II

try this...


Count(Distinct issuenum) where

duedate>= weekStart(duedate) and <=Weekend(duedate)


Or


=Sum({<OrderDate={'>=$(=WeekStart(OrderDate))<=$(=WeekEnd(OrderDate))'}>}OrderSalesAmount)

PrashantSangle

try

count({<dateField={">=$(=date(weekstart(duedate)))<=$(=date(weekend(duedate)))"}>} issuenum)

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
shiveshsingh
Master
Master

May be this


Count({<Weekday(Date(DueDate,'DD')) = {">=$(=weekday(WeekStart(DueDate,0,0)))<=$(=weekday(Weekend(DueDate,0,0)))"}>}Distinct issuenum)

shiveshsingh
Master
Master

What's the format of your Duedate?

bhavvibudagam
Creator II
Creator II
Author

Its MM/DD/YYYY

shiveshsingh
Master
Master

=Count(DISTINCT{<DueDate ={">=$(=Date(WeekStart(DueDate,0,0),'MM/DD/YYYY'))<=$(=Date(Weekend(DueDate,0,0),'MM/DD/YYYY'))"}>}issuenum)

Try this

bhavvibudagam
Creator II
Creator II
Author

Hi Shivesh,

Now getting 0

Thanks

shiveshsingh
Master
Master

Please share your app once

bhavvibudagam
Creator II
Creator II
Author

Hi Shivesh,

Sorry. I cant share the app its a large data file.