Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
vishalmanu
Partner - Creator
Partner - Creator

buttons with chart

hi,

i have two Buttons and a bar chat with two dimensions and one expression. When i select first button then the bar chart should reflect the first dimension and expression. If i select second button then the bar chart should reflect second dimension and expression. Please let me know how to achieve it.

12 Replies
aarkay29
Specialist
Specialist

PFA

Thanks,

Aar.

vishalmanu
Partner - Creator
Partner - Creator
Author

HI Aarav,

I could'nt find any attachment. How ever i am using a personal edition and i cant access the external qvw files. Can you please post the screen shots so that it would be helpful

Thanks

VishnuT

vishalmanu
Partner - Creator
Partner - Creator
Author

Hi Arav,

Could you please post the screenshots.

Thanks

effinty2112
Master
Master

Hi Vishnu,

There are many ways to do this. Try this:

In script

Set HidePrefix = '%';

ChartDims:

Load * InLine [

%ChartDim

ChartDim1

ChartDim2

];

In the above script replace ChartDim 1 & 2 with the names of your dimension fields.

Create a listbox on field %ChartDim. Select one value then in properties set to One Selected Value Only. Set the style to LED and if you want de-select Single Column if you want to display horizontally.

In your chart replace your dimensions with this single calculated dimension:

=[$(=%Dim1)]

Now when you change your selection in the listbox the dimension in the chart will change to the one you pick.

Cheers

Andrew

passionate
Specialist
Specialist

Hi Andrew,

Nice thought.

Different Approach to the Solution.

I tried this but, i was not able to set always one value select for hideprefix field.

i.e %Dim1 in your case.

Please help on this.

Thanks,

Pankaj

effinty2112
Master
Master

Hi Pankaj,

You need to select one and one only value in the listbox or the option for One Selected Value Only will be greyed out. Select one value and you should be able to do it.

Cheers

Andrew

sergio0592
Specialist III
Specialist III

But don't works if we select Dim1 and Dim2. Is there a way to allow that with adapting your solution??

Because i often use conditionnal hiding dimension/expression with using Concat and SubStringCount (Customizable Straight Table)

And if you have a big number of dimensions, it can be long because you have to go in properties and write formulas for each of them.

Thanks

passionate
Specialist
Specialist

HI Andrew,

I think this is not possible for Hide prefix field.

If you can post app in which you have implemented.

Thanks,

Pankaj

effinty2112
Master
Master

Hi Pankaj,

A field whose name begins with the HidePrefix, '%' in this case, is no different from any other except that when a selection is made on it that selection does not appear in a Current Selections object. Take away the HidePrefix line if you want.

Cheers

Andrew