Maybe as an option next idea?
The script loads an additional table with one field and the number of rows by the number of alternative states. Element 'Filter' to place near to the chart on the sheet. The filter measuring will only field eXtra loaded table.
Chart expressions linked to the selections in the filter. Changing the selections change the type of chart.
An example of the proposed options can be seen in the attached file qvf.
!!Alternative.qvf 208.0 K
This looks great, and is exactly what I'm looking for! I am trying to look at your file to see how you did it, but I am getting caught up in the 'State' field. I do not have such a field in my data, and am not sure how to add it in the data itself: each 'rule' is a column. All the rows are individual entries. Do I have to add 'State' as a separate column? I'm not sure how that would work because each individual entry will tick multiple rules.
Is 'State' something I can add within Qlik specifically for this purpose? Maybe you can walk me through the process you used for this, because as it is, it is exactly what I am looking for.
Analyze the file qvf.
The script editor.
AddMonths(Date('01.01.2016'), RecNo()-1) as Period,
rand() as Rule1,
rand() as Rule2,
rand() as Rule3,
rand() as Rule4,
rand() as Rule5,
rand() as Rule6,
rand() as Rule7,
rand() as Rule8,
rand() as Rule9,
rand() as Rule10,
rand() as Rule11,
rand() as Rule12,
rand() as Rule13,
rand() as Rule14,
rand() as Rule15,
rand() as Rule16,
rand() as Rule17,
rand() as Rule18,
rand() as Rule19
This part of the code that forms the following table analysis.
Structure your data can be different, but it does not affect the proposed approach.
Then we form our state table.
LOAD * INLINE [
The number of rows in the table corresponds to the number of chats options, in your case, the above four.
Then we go to the line chats in the application.
Dimension line chat - Period, Expressions five (the number of lines in one chat). Each expression defines the line depending on the state of.
For example, first line
If(State = 1 Or GetSelectedCount(State)=0, Sum(Rule1),
If(State = 2, Sum(Rule6),
If(State = 3, Sum(Rule11),
If(State = 4, Sum(Rule16),
For second line
If(State = 1 Or GetSelectedCount(State)=0, Sum(Rule2),
If(State = 2, Sum(Rule7),
If(State = 3, Sum(Rule12),
If(State = 4, Sum(Rule17),
Selecting the state is determined by the object "Filter", which is placed next to a line chart and has a dimension of "State"
Legend line chart displays the value of the label or expression itself, if the label is empty. It is not comfortable. To fix this, the label of each expression contains the point and near line chat is placed text box.
The expression of the text box
If(State = '1' Or GetSelectedCount(State)=0, 'Rule1 '&'Rule2 '& 'Rule3 '& 'Rule4 '&'Rule5 ',
If(State = '2' Or GetSelectedCount(State)=0, 'Rule6 '&'Rule7 '& 'Rule8 '& 'Rule9 '&'Rule10 ',
If(State = '3' Or GetSelectedCount(State)=0, 'Rule11 '&'Rule12 '& 'Rule13 '& 'Rule14 '&'Rule15 ',
If(State = '4' Or GetSelectedCount(State)=0, 'Rule16 '&'Rule17 '& 'Rule18 '& 'Rule19 ',
As seen text also depends on the state of.
In general, all.