Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

select multiple Measures in barchart

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

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

multiple measures 2.png

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

stevedarkstalwar1‌ @mto paulodantas‌  omarbensalem




1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: select multiple Measures in barchart

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:

Capture.PNG

Capture.PNG

Capture.PNG

Capture.PNG

View solution in original post

5 Replies
Highlighted
Partner
Partner

Re: select multiple Measures in barchart

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

Highlighted
Creator
Creator

Re: select multiple Measures in barchart

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.

multiple measures 3.png

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

Highlighted
Partner
Partner

Re: select multiple Measures in barchart

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:

Capture.PNG

Capture.PNG

Capture.PNG

Capture.PNG

View solution in original post

Highlighted
Creator
Creator

Re: select multiple Measures in barchart

yo, man omarbensalem‌ it's working!!!!!!, thank you so much my hugs to you from india.

Highlighted
Contributor III
Contributor III

Re: select multiple Measures in barchart

Thank you sir, this solution helped me out too!