Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Ignore date selection from calendar but not other filters

And it's me again.

I use the calendar range extension where I use Date(Floor(Date(TimeStamp,'MM/DD/YYYY hh:mm:ss.ffff')),'DD/MM/YYYY') as a Dimension. In addition, I added two more filters on the page (VISIT_VSL_NAME_AN and STOW_ACTIVITY_CODE).

In the graph, I want to compare the current year Export volume vs the last year. If no filter selection (VISIT_VSL_NAME_AN  or STOW_ACTIVITY_CODE) is made, the graph will show the overall trend. If the selection is made, the graph will show the trend for that selection.


I tried for this year line:

sum({1<[TimeStamp.Calendar.Year] = {"$(=Max({1}[TimeStamp.Calendar.year]))"}, SHIPPING_STATUS_CODE={'EX'}>} TEU). If a person selects this month, he will see the YTD trend line; last month - YTD trend line. It works fine when I apply other filters but then, when I make a calendar selection, it shows that month/date value, instead of showing the YTD trend line.


Another option I tried after reading the forum,

sum({1<[TimeStamp.Calendar.Year] = {"$(=Max({1}[TimeStamp.Calendar.year]))"}, SHIPPING_STATUS_CODE = {'EX', 'EXPRT'},

VISIT_VSL_NAME_AN=P(VISIT_VSL_NAME_AN), STOW_ACTIVITY_CODE=P(STOW_ACTIVITY_CODE)>}TEU) but it did not work.

I also thought of using TimeStamp=, TimeStamp.Calendar.Date= but I am not sure how to add the condition about the max year.

I suspect it's something basic here.

Many thanks,

10 Replies
agigliotti
Partner - Champion
Partner - Champion

maybe this:

{"$(=Max( {<1 TimeStamp = >} [TimeStamp.Calendar.year] ) )"}


I hope this helps.

Anonymous
Not applicable
Author

Hi Andrea,

Thank you for the response. Did you mean:


sum({1<[TimeStamp.Calendar.Year] = {"$(=Max( {1< TimeStamp = >} [TimeStamp.Calendar.year] ) )"}, SHIPPING_STATUS_CODE={'EX'}>} TEU)?


Nope, when any of the filters are select, the graph still shows the global trend line.

sunny_talwar

Qlik Sense's derived field are something I have a hard time having a grip on. I would recommend you to get rid of the derived calendar and create your own calendar and then the set analysis to ignore selection in month field should be ignored.

Anonymous
Not applicable
Author

That is such a wrong moment to do the re-design.

Sunny, my understanding is that you are a developer, are not you?

sunny_talwar

Yes, I am... why?

Anonymous
Not applicable
Author

Just out of curiosity as you reply to many questions raised.

The reason I am using the derived fields is because I am getting data from the MySQL db, and what I realized when I loaded the data for the first time is that the datetime col was not recognized. So, I found that I need to use the derived fields col. Am I missing anything here?

sunny_talwar

You can create a similar things using a script for master calendar

Creating A Master Calendar

Anonymous
Not applicable
Author

Would you suggest to create master calendars for every datetime following Using Multiple Dates With Master Calendar‌?

sunny_talwar

Do you have more than one date field? If you do.... then may be do create multiple calendars.... or create them for the ones which you plan to use on the front end