Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
dukane24
Contributor III
Contributor III

Default to max date where max date is a business day

Hello,

There is something I'm trying to do that I believe should be simple but it is eluding me.  My objective is simply to find a day to default to the max date where the max date is a business day.  So if the user opens the dashboard on a Monday morning, it will default to Friday.

There is a method I am using to select the max business day "on open", using the following expression:

=Dayname(Max({<WorkDayInd={'1'}>} CLNDR_DT))

This works great as long as I remember to clear all selections before I hit save (for some reason adding a "Clear All" rule prior to this one no longer works, but that is an issue for a different day).

Then I discovered just recently that I could use the following expression to select the max date regardless of current selections:

=Max({1} CLNDR_DT)

This works great, the only problem is that is does not take business days into account, so on Monday it will default to Sunday.  I am trying to combine the two but I am not having any luck.  If you have any ideas on a method I could use to choose max business day while ignoring current selections, it would be much appreciated.

Thank you!

Labels (1)
1 Solution

Accepted Solutions
atoz1158
Creator II
Creator II

Hi

try using the following

=Dayname(Max({1<WorkDayInd={'1'}>} CLNDR_DT))

Regards

Adrian

View solution in original post

2 Replies
atoz1158
Creator II
Creator II

Hi

try using the following

=Dayname(Max({1<WorkDayInd={'1'}>} CLNDR_DT))

Regards

Adrian

Brett_Bleess
Former Employee
Former Employee

Did Atoz's post help you with things?  If so, do not forget to return to the thread and use the Accept as Solution button on the post to give them credit for the assistance, as this gives them credit and lets other Members know it worked.  If you are still working on things please leave an update as we would prefer to have posts closed out if possible.

You may want to have a look at the following Design Blog, it may be another way to go at things I believe:

https://community.qlik.com/t5/Qlik-Design-Blog/Redefining-the-Week-Start/ba-p/1473588

The base URL for this area is:

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

There are over 700 posts in that area of the Community from our internal experts and most are how-to based.

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.