Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Two similar fields with different selections for one single chart

//topic edited - see fourth post

Hello everyone,

I have two listboxes with identical fields. The first field is the original imported coloumn out of the excel file. The second one is defined in the loadscript as:

LOAD employee as employee2
FROM
excelfile.xlsx
(
ooxml, embedded labels, table is ALL);

In the first listbox you can select the employee that you want to compare to the others. Only one selection is possible and the field is "employee2".

In the second listbox one can select multiple employees that are in the reference group. The field is the original employee coloum.

If I now select "employee" as the dimension of the scatter table, everything is well illustrated except the value selected in my first listbox.

Same vice versa... only the employee is visible but no longer the reference group.

I have tried to use both fields as dimensions, but only the second listbox is illustrated then or all points are named equally.

All your support is much appreciated! Please let me know if you need further details.

Regards

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Not sure how you set up your model so that you can select a customer and its peer group.

You can do this using alternate states in QlikView and combine the selections using set analysis. Something like creating alternate state AS, then create two list boxes for Customer, one in state AS and a chart with dimension Customer and expressions like

=Sum({AS+$} Value)

2016-04-21 23_28_10-QlikView x64 - [C__Users_Stefan_Downloads_comm213915.qvw].png

View solution in original post

10 Replies
swuehl
MVP
MVP

Are you referring to a scatter chart? Or a pivot table?

A scatter chart uses the dimension(s) only to group the records that are used in the numeric x/y coordinates calculations (two expressions).

If you want to have your employees along the axis, I think you would need to use a grid chart or a pivot table.

Not applicable
Author

Hi swuehl, thank you for your quick response!

I am referring to a scatter chart. As mentioned above, both listboxes have exactly the same entities.


I would like to have two different KPIs on both the x- and the y-axis which works out well so far. The only issue is that only the selections of one listbox are displayed in the scatter chart and not both. Therefore, I can compare the reference employees to each other but the actual employee I wanna check, which I displayed in the other listbox, is not shown.

Is there any option to combine two dimensions, so that the illustrated group displays both the reference employees and the employee I wanna check?example scatter chart.jpg

Not applicable
Author

Actually, I found out that it is always the same issue for all of my charts and tables, where I tried to illustrate both fields in one graph.

The setup is always identical in terms of having an employee, which I can select in the first listbox, and a reference group, which I can select in a second listbox.

Is there a way to combine both selections, so that both the employee and the reference group including all other selected employees in the second listbox are shown in the charts.

Preferably, the dot or generally the value of the particular employee from lisbox one shall be illustrated in blue colour, if possible.

swuehl
MVP
MVP

Not sure how you set up your model so that you can select a customer and its peer group.

You can do this using alternate states in QlikView and combine the selections using set analysis. Something like creating alternate state AS, then create two list boxes for Customer, one in state AS and a chart with dimension Customer and expressions like

=Sum({AS+$} Value)

2016-04-21 23_28_10-QlikView x64 - [C__Users_Stefan_Downloads_comm213915.qvw].png

Not applicable
Author

Perfect, I am almost there. Thanks a lot.

There are two things I don't understand:

1. I don't have the "value" command and don't really know what to use there.

2. If it is a main part of it... I don't really understand your script.

swuehl
MVP
MVP

The script is basically just the test script you can create from the script editor, just to create some data in short time (changed some field names).

'Value' in my expression is just a field name.

Not applicable
Author

But why do you use it? I saw "value" in the load script but really don't understand what you use it for.

( Round(Rand()*Rand1,0.00001) as Value;)

I mean.. the x axis and the y axis are defined by sales and profit and the field which is illustrated in the chart is customers. So what is value for or what do I logically need to replace it with to make my table work, which is almost identical to your sample?

swuehl
MVP
MVP

AFAIR, I've use this expression for the bubble size (third expression in the chart).

Don't get confused with the script: It's just the test script. Over complicated calculcations. Just to create numbers.

Not applicable
Author

How did you change the colour for the dots, so that the alternate state is presented in a different colour?