Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
nehasaxena
Creator II
Creator II

Default selection in date wit specific condition

Hi Members,

I have to implement 1 scenario - Select date of previous month end when activate sheet.  This is easily achievable but the complexity is for the work day 1 and work day 2 select previous to previous month end.  For rest of the days its previous month end.

I have 1 qvd it has work day info with dates.  I am not able to figure out how do i use this work day table to handle the selections for work day 1 and 2.

If someone has any idea please do share. It would be great help for me. Thanks

Regards

Neha

 

Labels (3)
7 Replies
sunny_talwar

@nehasaxena would you be able to share some sample data and explain what are you looking to get from the sample you share

nehasaxena
Creator II
Creator II
Author

 I am adding more information. 2 Excel files attached, 1 file has the dates that are in my main data. Records are available only for these dates. 

2nd file is which has workday information.

I want to achieve soemthing like this  - =If(match(workday,'WD1','WD2'),Date(MonthEnd(AddMonths(today(),-2)),'M/D/YYYY'),Date(MonthEnd(AddMonths(today(),-1)),'M/D/YYYY'))

This i want trigger when specific sheet open. But we have select in field trigger, not sure this kind of expression will work. 

Hope this helps. Please do suggest.

nehasaxena
Creator II
Creator II
Author

Hi Sunny, I have replied in original post please do check the files.

juanma21
Contributor III
Contributor III

More or less something like that, filters can help you.

SCRIPT:

WorkDay:
LOAD WorkDay,
Date,
monthend(Date) as Month_End
FROM [C:\Users\Juan\Desktop\Tablas\WorkDay.xlsx]
(ooxml, embedded labels, table is Sheet1);

juanma21
Contributor III
Contributor III

in the script you can use the weeks

SCRIPT:

WorkDay:
LOAD WorkDay,
Date,
Monthend(Date) as Month_End,
Week(Date) as WeekDay
FROM [C:\Users\Juan\Desktop\Tablas\WorkDay.xlsx]
(ooxml, embedded labels, table is Sheet1);

juanma21_0-1601495996464.png

 

juanma21
Contributor III
Contributor III

I hope I have helped you in something, if it is not the case, please give me more details
Greetings

Juan

 

Brett_Bleess
Former Employee
Former Employee

@sunny_talwar Since I think notifications are still not working as they used to, just wanted to flag this one, as poster did respond back and attach some data files, another poster did reply, but we have no close-out by the poster either, so if you can have a look if you have time, much appreciated.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.