Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new to Qlik Sense. I am trying to do something that looks simple, yet, I couldn't find the proper way to do it. I would appreciate if someone could give me some cues on how to do the following.
I have a list of people with the score they got at certain time and a reference score. I want to display this information on a line chart. I want the user to select one or many people in a filter pane but I want the reference to be displayed all the time. So, I want the reference to be displayed without having the user selecting it every time.
Here is an example of the data.
Person | March | April | May | June |
---|---|---|---|---|
A | 60 | 50 | 80 | 75 |
B | 98 | 17 | 86 | 73 |
C | 54 | 89 | 45 | 96 |
Ref | 68 | 52 | 78 | 83 |
How would you this?
Thanks a lot for your help!
Excellent solution @Juraj ! Just a minor syntax correction, the expression with Set Analysis is =Sum({<Person+={'Ref'}>} Score)
Sample app is attached.
Add the "reference" line as a separate measure using set analysis;
Max(<Person={'Ref'} Score)
In QlikView, you can apply a Trigger on "OnAnySelect" event to force a selection on Person=Ref
Qlik Sense, however, does not provide this level of control. You can only add a fixed reference line https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Visualizations/reference-lines.htm
Try using this extension
Hi,
try creating a line chart with Month and Person as dimensions and a measure like this:
Sum(<Person+={'Ref'} Score)
This will add the reference score to any selection user makes.
By the way (maybe you know this, but in case not), if source data actually look like the table you attached to your post, you'd need to do a crosstable load to transpose the table.
Hope this helps.
Juraj
Excellent solution @Juraj ! Just a minor syntax correction, the expression with Set Analysis is =Sum({<Person+={'Ref'}>} Score)
Sample app is attached.
(insert facepalm meme here) What a stupid mistake! To my defense, it was after midnight when I wrote it so those braces got lost...
Thanks a lot!
If I wanted to include 2 ref (Ref1 and Ref2), would the statement become =Sum({<Person+={'Ref1', 'Ref2'}>} Score) ?
Yes, exactly.