Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

d4rlie891
Not applicable

Ignore Selection for Max Avg

Hi,

anyone can help me, I need to ignore the DAY selection from my Set Analysis.

I only have data on Day 1. If someone click the DAY other than DAY 1, I want this KPI keep showing the Value.

Max Avg.jpgMax Avg Selection.jpg

The point is, I want to Ignore the DAY selection.

These are my Set Analysis :

1. Max(Aggr(Avg({$<YEAR_MONTH = {"$(=max(YEAR_MONTH))"}, ONL_BTC={'ONL'}, WEEKDAY-={'Sun','Sat'}, HOLIDAY_FLG={'N'}>}ESAP),DAY))

2. FirstSortedValue(TANGGAL, -Aggr(Avg({<ONL_BTC={'ONL'}, YEAR_MONTH = {"$(=max(YEAR_MONTH))"}, DAY, WEEKDAY-={'Sun','Sat'}, HOLIDAY_FLG={'N'}>} ESAP), TANGGAL))

Thanks

1 Solution

Accepted Solutions
sunny_talwar
Not applicable

Re: Ignore Selection for Max Avg

May be this:

1. Max({<DAY>}Aggr(Avg({$<YEAR_MONTH = {"$(=Max({<DAY>}YEAR_MONTH))"}, ONL_BTC={'ONL'}, WEEKDAY-={'Sun','Sat'}, HOLIDAY_FLG={'N'}, DAY>} ESAP), DAY))

2. FirstSortedValue({<DAY>} TANGGAL, -Aggr(Avg({<ONL_BTC={'ONL'}, YEAR_MONTH = {"$(=Max({<DAY>}YEAR_MONTH))"}, DAY, WEEKDAY-={'Sun','Sat'}, HOLIDAY_FLG={'N'}>} ESAP), TANGGAL))

4 Replies
sunny_talwar
Not applicable

Re: Ignore Selection for Max Avg

May be this:

1. Max({<DAY>}Aggr(Avg({$<YEAR_MONTH = {"$(=Max({<DAY>}YEAR_MONTH))"}, ONL_BTC={'ONL'}, WEEKDAY-={'Sun','Sat'}, HOLIDAY_FLG={'N'}, DAY>} ESAP), DAY))

2. FirstSortedValue({<DAY>} TANGGAL, -Aggr(Avg({<ONL_BTC={'ONL'}, YEAR_MONTH = {"$(=Max({<DAY>}YEAR_MONTH))"}, DAY, WEEKDAY-={'Sun','Sat'}, HOLIDAY_FLG={'N'}>} ESAP), TANGGAL))

d4rlie891
Not applicable

Re: Ignore Selection for Max Avg

Hi Sunny,

It's Worked,

But I am still not fully understand about the logic of this Set Analysis.

Could you give me some explanation about this logic.

Thanks so much.

sunny_talwar
Not applicable

Re: Ignore Selection for Max Avg

Basically telling the expression to ignore selection in DAY in every possible Aggregation function that I see in those two expression.

Min, Max, Sum, Avg, FirstSortedValue, Only, Median...... Everywhere you see these, you will have to add a set analysis to ignore selection in DAY. This can be done like this {<DAY>} or {<DAY = >}

d4rlie891
Not applicable

Re: Ignore Selection for Max Avg

Thanks again for your information.