Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Get n-highest values for each dimension in cyclic group

Hello there,

In some of my charts, I am using the following calculated dimension. It gives preference to the users' selection via list boxes, but in the absence of any, it will restrict the x-axis values to the latest 31 days.

IF(GetSelectedCount(Date) > 0, Date, IF(Date >= Today()-30, Date))

Now, I would like to port it to some other charts. There is a caveat, for said charts don't simply have "Date" as the x-axis dimension but rather a cyclic group that includes date, but also contains year, month, calendar week etc...

Provided I am not even sure if this can work with a front-end defined group, my issue is that I would need to change the second part of the formula from "check if a given date value falls in the range from today-30 to today" to "give me the latest(greatest) possible values for the given dimension within the group" aka the last 30 days if date is selected in the cyclic group, latest 30 months, latest 30 years...

I can imagine doing this with lots of nested IFs and creating the group in the back-end by inline, but was wondering if maybe there is a formula that could make this a one liner (or close to that).


Labels (3)
1 Reply

I think this might work if you use calculated dimensions within your cyclic group. Have you tried that already?