Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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)))
Hi,
You can try to add a set analysis on your max $(=Max({1}Year))
Aurélien
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)))
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.
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
Still responds. Let me create a sample from my app.
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)))
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!!!
Sometimes all you need is another set of eyes . Happens to all of us