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

Ignore filter selection in a graph where set analysis is used

Good day,

I have been wrapping head around the set analysis and there is one case I cannot get.

I have a line graph with two lines for this year and previous year. This year is calculated as:

(count({1<[TimeStamp.AutoCalendar.Year] = {"$(=Max(Year))"}>}CNTR_vessel)

/

/sum({1<[TimeStamp.AutoCalendar.Year] = {"$(=Max(Year))"}>}aggr(((TimeStamp - VSL_BERTH_D)*24), Vessel_visit_vessel)))

I also have a calendar extension on the page. Unfortunately, the formula above doesn't work as expected - have a static graph which doesn't change on the selection and does not get re-calculated every time a user selects a date in the calendar.

Honestly, I have no clue why the graph is still responsive to the filter as I added '1' to the formula to ignore the selection. Interestingly, though, that both a nominator and denominator, when added separately, are not responsive to the calendar. I think I read all existing threads on ignoring the filter in the graph but nothing worked. I will be grateful if you could direct me, please.

1 Solution

Accepted Solutions
sunny_talwar

Try this

(Count({1<[TimeStamp.AutoCalendar.Year] = {"$(=Max({1} Year))"}>} CNTR_vessel)

/

Sum({1<[TimeStamp.AutoCalendar.Year] = {"$(=Max({1} Year))"}>} Aggr(Only({1} (TimeStamp - VSL_BERTH_D)*24), Vessel_visit_vessel)))

View solution in original post

8 Replies
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

You can try to add a set analysis on your max $(=Max({1}Year))


Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!
Anonymous
Not applicable
Author

Hi Aurélien,

Thank you for the response! If I correct to the below, the graph still responds to the date selection

(count({1<[TimeStamp.AutoCalendar.Year] = {"$(=Max({1}Year))"}>}CNTR_vessel)

/

sum({1<[TimeStamp.AutoCalendar.Year] = {"$(=Max({1}Year))"}>}aggr(((TimeStamp - VSL_BERTH_D)*24), Vessel_visit_vessel)))

Anonymous
Not applicable
Author

There is something to be done with the division itself something that will do {1} on the division itself - well, that's my sick logic.

Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

ok , and with {1} on the aggr ? like this :

(count({1<[TimeStamp.AutoCalendar.Year] = {"$(=Max({1}Year))"}>}CNTR_vessel)

/

sum({1<[TimeStamp.AutoCalendar.Year] = {"$(=Max({1}Year))"}>} aggr({1} ((TimeStamp - VSL_BERTH_D)*24), Vessel_visit_vessel)))

or if you can share your qvw

Help users find answers! Don't forget to mark a solution that worked for you!
Anonymous
Not applicable
Author

Still responds. Let me create a sample from my app.

sunny_talwar

Try this

(Count({1<[TimeStamp.AutoCalendar.Year] = {"$(=Max({1} Year))"}>} CNTR_vessel)

/

Sum({1<[TimeStamp.AutoCalendar.Year] = {"$(=Max({1} Year))"}>} Aggr(Only({1} (TimeStamp - VSL_BERTH_D)*24), Vessel_visit_vessel)))

Anonymous
Not applicable
Author

Hi Sunny,

Kill me here, it took me half a day of trial and error and 14 minutes for you to see my post to give me the correct answer.

Aurélien, thank you for the help!!!

sunny_talwar

Sometimes all you need is another set of eyes . Happens to all of us