Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a line chart with 2 expressions:
exp1:=Only({$<kpi={'$(vFirstKpiSelected)'}}>}data)
exp2:=Only({$<kpi={'$(vSecondKpiSelected)'}}>}data)
My question is: can I have multiple lines in chart (based on multiple selection from a listbox) for a single expresion?
Something like:
exp1:=Only({$<kpi={'$(vFirstKpiSelected)'}, ITEM_CODE={'item1','item2','item3'}}>}data)
and
exp2:=Only({$<kpi={'$(vSecondKpiSelected)'}, ITEM_CODE={'item1','item2','item3'}}>}data)
I tried this but it doesn't work.
Can you please help me?
Thank you.
Hello, thx for your help.
I managed to find a solution:
http://community.qlik.com/message/336572#336572
'For lines you can use two dimensions and one expression or one dimension and lots of expressions. If you need more than you'll have to use two charts and overlay them and give the top chart a transparent plot are'
You can have multiple lines, set up with multiple expressions that are similar in this way.
Could it be that you are using only() instead of sum(). Only() will only return datapoints if there is just the one value.
Jonathan
I tried sum
=Sum({$<kpi={'$(vPanel_KPI1_KPI1)'}>}data)
but still doesn't work, I have still one line per expression.
Please check attached image:
- the solid line is for kpi1 has expresion1 : -> exp1:=Only({$<kpi={'$(vFirstKpiSelected)'}}>}data)
- the dashed line is for kpi2 has expresion2 : -> exp2:=Only({$<kpi={'$(vSecondKpiSelected)'}}>}data)
- blue solid and dashed line are for product1
- red solid and dashed line are for product1
What I want to achieve is to have blue solid+red solid for exp 1
blue dashed + red dashed for exp2.
Have any ideas?
So do you have the lines coming out ok ? Is it just the formatting you are working on now ?
Jonathan
Hello, thx for your help.
I managed to find a solution:
http://community.qlik.com/message/336572#336572
'For lines you can use two dimensions and one expression or one dimension and lots of expressions. If you need more than you'll have to use two charts and overlay them and give the top chart a transparent plot are'