Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

wonkymeister
Contributor

Class & Age Function

Morning all!

i use the Class and Age functions to create age bands in a table for employee date of births i.e.

=Class(Age('$(vMyDate)',date_of_birth),5,'Age Band' )  -- where vMyDate is a variable storing todays date

Now this displays perfectly as you'd imagine, as a list of staff by age bands. The problem that i have is that when an age band is selected and therefore the results restricted you cant deselect it to go back to the full list.

i guess this is because the user isn't actually selecting an age band, but what is essentially a function.

does anyone know of any workarounds to make it de-selectable?

thanks in advance

Tags (1)
15 Replies
MVP
MVP

Re: Class & Age Function

Could you post your sample qvw that demonstrates the issue?

wonkymeister
Contributor

Re: Class & Age Function

complete list:

Band Full.PNG.png

then select a band:

Band Restricted.PNG.png

the user is now unable to deselect the band and go back to the full list.

Re: Class & Age Function

Have you tried to create a button with action clear all ?

wonkymeister
Contributor

Re: Class & Age Function

thanks, but i dont want to clear all, i just want to de-select the selected band.

Re: Class & Age Function

What happens when you again click on the same age band?

wonkymeister
Contributor

Re: Class & Age Function

nothing. the field turns green on click, but doesn't deselect.

its displayed as in current selections (PA0002_Gbdata is the date of birth field):

Current Selections.PNG.png

Re: Class & Age Function

It's difficult to answer now...

can you please upload your sample apps with reduced or dummy data?

MVP
MVP

Re: Class & Age Function

Hi

As you have seen, selecting a row is effectively selecting a range of date_of_birth fields. You could create a button with the action of clearing the selections in the date_of_birth field. You could even give this button (or text box) the little eraser icon and position it on the caption over the current eraser icon. Make sure that the button/text box is on a higher layer than the table.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
wonkymeister
Contributor

Re: Class & Age Function

I had a feeling it was a non-starter Jonathan.

Thanks all for the replies and help.

Community Browser