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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to max calendar object order by today first

Hi

Does anyone know how to make my calendar object show today first when the field is blank, I have tried all several expression sort orders but still getting Oct 2008 instead of today

Any help would be great

Thanks


Andy

11 Replies
Miguel_Angel_Baeyens

Hello Andy,

Do you mean sort your chart descending by date when there are no dates selected? Have you tried as expression just the date field name?

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Hi Miguel

I use a island table to create from and start date calendar objects  that set a variable to apply to charts. If the calendar object is empty then the first date the object shows is Oct 2008, the clients wants today (June 2011) to be shown on selection. I have set the select field on a button to today and that works but if someone clears the selectiosn then I'm back to 2008

Hope that helps and thanks for the reply

Andy

Miguel_Angel_Baeyens

Hello Andy,

Did you try to use Max(DateFieldInIsland) as expression in the sort by / descending dialog?

It would help if you could post some dummy data in an actual file.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Hi Miguel

Sorry for the delay. Please find example attached. Trying to get the Calendar Icon to default to Today's Month when field is empty.

Thanks


Andy

Miguel_Angel_Baeyens

Hello Andy,

There's no attached file. Anyway, you can use an action or trigger so when the document is opened, Selection, Select in Field, Field Name Month (or your actual month field name) and "=Month(Today())" (without quotes) as the query string.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Hi

File is now attached. I use tiggers on open and also on a reset button but its when users use the clear button that I have the issue.

Thanks for the answers so far

Andy

Miguel_Angel_Baeyens

Hello Andy,

That clear button may have another action, after clearing all selections, to likewise select the current month in the month field, is that right?

Regards,

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Hey

I would just like the sort order to be Today (Decending) on first click of the item, I can do this via tiggers but they dont cover all situations. I have tried a few SORT expression but with no look.

Thanks

Andy

Miguel_Angel_Baeyens

Hello Andy,

Try going to the calendar object properties, Sort tab, and check Numeric Value -> Descending and Expression -> Descending with the following

If(StartDate <= Today(), StartDate, false())

This should show first, in descending order, all the dates starting today backwards, then all remaning dates in the field in descending order.

Is that what you are looking for?

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica