Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi, qlik community,
my requirement is to select multiple measures in the bar chart with the help of filter pane.
currently iam able to do this functionality by using below extension
https://github.com/barryharmsen/bitmetric-variable-toggle
but the main problem is I am able to select only one measure at a time with that button extension like below
image: multiple measures 1.png
finally what I want is I should able to select multiple measures in the bar chart with the help of filter pane something like below
attached sample application please check and respond
timeline.qvf
its weekend time I have to complete this issue otherwise I have to stay in office even weekend also
stevedark stalwar1 @mto paulodantas omarbensalem
My bad !
alter u measures as follow:
if(SubStringCount ( Concat(MeasureID), 1 )<>0, Sum(cost))
if(SubStringCount ( Concat(MeasureID), 2 )<>0, Sum(weight))
if(SubStringCount ( Concat(MeasureID), 3 )<>0, Sum(weight)+sum(cost))
result:
Always use inline table for such a thing;
load * inline [
MeasureID,Measure
1,cost
2,weight
3,total
];
add this new field as a filter panel;
in ur expressions now, change them as follow:
measure1: cost
if(MeasureID=1, YourActualExpressionForSumCost)
measure2: weight
if(MeasureID=1, YourActualExpressionForSumWeight)
measure1: total
if(MeasureID=1, YourActualExpressionForTotal)
Now, depends on what u select; u'll have the measures u want to show..shown ! It's magic isn't it?
One more thing, u can add yet another coniditon in ur expression to show all 3 measure if u do not select any;
exp:
instead of if(MeasureID=1, YourActualExpressionForSumCost)
if(MeasureID=1 or count(distinct MeasureID)=3 , YourActualExpressionForSumCost)
Have a nice weekend
thank you omarbensalem for your suggestion, its working for only one selection not for multiple
example 1: if I select cost in filter pane its showing cost related bar in bar chart this is good
example 2: if I select cost and weight in filter pane nothing is showing in a bar chart.
required result: if I select cost and weight in the filter I am able to see the cost and weight bars in the chart.
Note: updated sample app as you suggested please check
My bad !
alter u measures as follow:
if(SubStringCount ( Concat(MeasureID), 1 )<>0, Sum(cost))
if(SubStringCount ( Concat(MeasureID), 2 )<>0, Sum(weight))
if(SubStringCount ( Concat(MeasureID), 3 )<>0, Sum(weight)+sum(cost))
result:
yo, man omarbensalem it's working!!!!!!, thank you so much my hugs to you from india.
Thank you sir, this solution helped me out too!
load * inline [
MeasureID,Measure
1,cost
2,weight
3,total
];
add this new field as a filter panel;
_____________________
I need the above solution for my app. How do I create this field and add to filter pane. Is it created in the Load Editor? Could someone please provide more details