Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
richters
Partner - Contributor III
Partner - Contributor III

Calendar linked - get right day of week

Hi,

I have got a Calender-table where the date is linked to all date-fields in the application. When I now look at one action there can be e.g. a start and end date in row. For sure, they can be different to each other so it is not easy to get the right day of week to the right date-field.

In my application I e.g. want to get the Weekday for the Startdate when a visit (that's what the application is about) is chosen.

So I choose visit '1' and want to get the weekday of the startdate in a textbox. My idea:

=only( {<Date= StartDate>} Weekday_Short)

Worked fine when I choose the StartDate, too. But when I do not activate the StartDate, there is no result given.

Anyone has an idea?

Thanks in advance.

1 Solution

Accepted Solutions
Nicole-Smith

I have attached the fixed .qvw.  It works when you select an ID.  If you can't look at the .qvw, the expressions I used in the text boxes are:

=only( {<Date={'$(=StartDate)'}>} Weekday_Short)

and

=only( {<Date={'$(=EndDate)'}>} Weekday_Short)

View solution in original post

6 Replies
Nicole-Smith

Your expression will not work unless a StartDate is chosen (because you're saying show when Date= StartDate, but that means if no StartDate is chosen, then Date is equal to the whole list of StartDate and only() will return exactly one value--if you want to see what I mean, try replacing only() with concat()).  I'm not sure what you would want it to show when no StartDate is chosen.

richters
Partner - Contributor III
Partner - Contributor III
Author

Hi,

I want to choose a visit and show the weekday of the StartDate in a Textbox.

Concat() does also not work unless the StartDate is selected.

Nicole-Smith

Can you post a sample .qvw?

richters
Partner - Contributor III
Partner - Contributor III
Author

Hi,

example attached.

Nicole-Smith

I have attached the fixed .qvw.  It works when you select an ID.  If you can't look at the .qvw, the expressions I used in the text boxes are:

=only( {<Date={'$(=StartDate)'}>} Weekday_Short)

and

=only( {<Date={'$(=EndDate)'}>} Weekday_Short)

richters
Partner - Contributor III
Partner - Contributor III
Author

Thanks, all I needed.