Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Allowing user to select two years to compare in a bar chart?

Hello QlikView experts!

Following on my previous question (Comparing 2 consecutive years - Charts showing changes between 2 years) I'm now struggling with creating a slightly different chart using the same data.

I have school attainment data (many students, several different measures) for 4 years and would like to have a bar chart showing the differences between any two years which the user will select. I started by doing a set of text boxes that each would select 'year 1' and 'year 2' (using variables) and I was thinking to include these variables in the expressions but only once I did this I realized there is no connection to the actual year data....

I'm attaching an empty qvd file - just with the example data - and would greatly appreciate your help.

Thank you very much in advance,

Marketa

Tags (3)
9 Replies
Not applicable

Re: Allowing user to select two years to compare in a bar chart?

Marketa,

do you always need comparision of consecutive years (Year vs Year-1) or you would like to allow selection of whichever two years?

Not applicable

Re: Allowing user to select two years to compare in a bar chart?

Hi Marketa

an easy way is to use the property "set reference"  (check qvw)

make a 1st year selection, use "Set reference" and choose another year and you will see both

best regards

Chris

Not applicable

Re: Allowing user to select two years to compare in a bar chart?

Dariusz,

I actually need both. I'll be doing the two following charts:

1. Comparison of each two consecutive years (showing the actual change between the two years) where all years can be viewed at the same time and where also the user can select to see just one or more comparions  (my question here Comparing 2 consecutive years - Charts showing changes between 2 years)

2. Comparison of whichever two years where the user selects which 2 years they want to compare (still showing the actual change between the two years).

I hope this makes it bit clearer.

Thanks a lot for any insight into this!

M

Not applicable

Re: Allowing user to select two years to compare in a bar chart?

Marketa,

the best approach for comaprision 2 user selections is alternate states.

You may define your states in Settings/Document Properties.

Then you may use state name in set analysis and also decide, that object (for example listbox) belongs to some state.

This will let you resolve problem of comparision of two user selections.

Of course you may use the same also for consecutive years comparisions. But for that 2'nd scenario there are also mor user friendly approaches In fact user need to select only one year or even see YoY KPI with year as dimension (without any Year selections)...

regards

Darek

Not applicable

Re: Allowing user to select two years to compare in a bar chart?

Hi Chris,

This is definitely a great function that I had not been aware of! Nevertheless it does not do exactly what I need as I want  to show the actual difference between two years. Also, I just tried to use the 'set reference' in a dashboard published on a QV server - which is how our clients use it - and I don't think the option is there.

Thanks for the information anyway, I learned something new!

Best wishes,

Marketa

Not applicable

Re: Allowing user to select two years to compare in a bar chart?

verificar as propriedades do gráfico em dimensões e colocar os resultados nas "dimensões utilizadas" ano.

acredito que vai conhecê-lo!

Sem título.png

Not applicable

Re: Allowing user to select two years to compare in a bar chart?

Thanks a lot Darek, I'll try all that.

I'm just wondering whether this way I'll be able to get QV to show the change between the two years, not just show the two years next to each other... I think I haven't been clear about this since the beginning. But I'll try and see.

Thank you!

Best wishes,

Marketa

Not applicable

Re: Allowing user to select two years to compare in a bar chart?

Thanks, but I need QV to calculate and show the actual difference between the two years, not just showing the data for the years next to each other...

Not applicable

Re: Allowing user to select two years to compare in a bar chart?

You will be able to use both alternate states in one expression of course

23-05-2014 16:19 użytkownik "Marketa Bilska" <qcwebmaster@qlik.com>

napisał:

Qlik Community <http://community.qlik.com/> Allowing user to

select two years to compare in a bar chart?

reply from Marketa Bilska<http://community.qlik.com/people/marketa.bilska?et=watches.email.thread>in *Creating

Analytics* - View the full discussion<http://community.qlik.com/message/534667?et=watches.email.thread#534667>

Community Browser