Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Not applicable

How to set a default value in a list

Hi,

I am new in QlikView, so sorry if this is a silly question and sorry for my poor English too.

Let me explain the situation

I have a chart showing the schools (y axis) and the number of students (x-axis) and a list to filter schools.

What I need is the chart always showing a default school.

And when I select another school on the list this second school should appear along with the other to compare both.

If it is possible I also would like if the default school didn't appear in the list

Let me you if you need more details.

1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: How to set a default value in a list

I'm not sure I understand the requirement completely either, but throwing out something at random:

if(getselectedcount(School)
  ,only({<School+={'school1'}>} NumberofStudent)
  ,only({<School ={'school1'}>} NumberofStudent))

Edit: and to hide the default School on the list, use an expression for the list box, maybe something like =if(School<>'school1',School)

View solution in original post

9 Replies
Highlighted

Re: How to set a default value in a list

Try it using this set analysis:

{<$+<School = {'School1'}>}

So if this was your expression -> Sum(Revenue), you will need to change it to -> Sum({<$+<School = {'School1'}>}Revenue)

Highlighted
Not applicable

Re: How to set a default value in a list

I already tried set analysis.

I don't need sum so tried only({$<School={'school1'}>}[NumberofStudent])

and this work but when I click in other school on the list there are no chage in the chart it keeps showing only the default school

Highlighted

Re: How to set a default value in a list

Add a + between $ and <

Only({$+<School={'school1'}>}[NumberofStudent])

Highlighted
Not applicable

Re: How to set a default value in a list

it helped at first it shows all the schools but when I select other schol on the list it shows just the selected school and the default school. And to hide the default school on the list one simple if was enough.

Thank you.

If know a way to show just the default school at first let me know.

Re: How to set a default value in a list

I thought that was the requirement that you wanted to add by selection other schools?

Highlighted
Not applicable

Re: How to set a default value in a list

Yes I want to add by selection, But when any school is selected it is showing all the schools and if it is possible I would like to show just the default school when any other school is selected.

Highlighted
MVP
MVP

Re: How to set a default value in a list

I'm not sure I understand the requirement completely either, but throwing out something at random:

if(getselectedcount(School)
  ,only({<School+={'school1'}>} NumberofStudent)
  ,only({<School ={'school1'}>} NumberofStudent))

Edit: and to hide the default School on the list, use an expression for the list box, maybe something like =if(School<>'school1',School)

View solution in original post

Highlighted
Not applicable

Re: How to set a default value in a list

Thank you. worked

Highlighted

Re: How to set a default value in a list

Please close this thread by marking John's answer as correct answer.

Qlik Community Tip: Marking Replies as Correct or Helpful