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: 
adamjwchen
Contributor III
Contributor III

Select first working days of selected months

Hi,

I have a date column list all date of a year and I have a column marks each date is working day or not. I would like to make a filter to select first x working day of each month, is this doable?

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

New Attachment (TOTAL Corrected)

View solution in original post

9 Replies
sunny_talwar

May be like this

LastWorkDate(MonthStart(Max(Date)), 1)

adamjwchen
Contributor III
Contributor III
Author

What I try to establish is I can input value 10 and then first 10 working day of each month are selected. so all other data are calculated automatically.

sunny_talwar

Do you have a sample you can share?

adamjwchen
Contributor III
Contributor III
Author

Here is the sample.

Right now I can select workingDay "Y" to calculate working day sales of each month.

but  what I want to achieve is to calculate sales$ of first X working day of each month.

adamjwchen
Contributor III
Contributor III
Author

posted

sunny_talwar

Try this

Sum(Aggr(If(Date <= LastWorkDate(MonthStart(Max(TOTAL <Month> Date)), vFirstNWorkingDays), SALES$), Month, Date))

Capture.PNG

Or this

Sum({<WorkingDay = {'Y'}>}Aggr(If(Date <= LastWorkDate(MonthStart(Max(TOTAL <Month> Date)), vFirstNWorkingDays), SALES$), Month, Date))

antoniotiman
Master III
Master III

Hi Adam,

see Attachment.

I assume x = 10

Regards,

Antonio

antoniotiman
Master III
Master III

New Attachment (TOTAL Corrected)

adamjwchen
Contributor III
Contributor III
Author

Antonio,

Your sample is helpful!!