Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Defaut selection on button

PFA qvf file ...qliksense

So when I switch from one button to other (Primary button) , I want there should be default select on other set of button (Secondary buttons) which is currently not happening.

30 Replies
Anonymous
Not applicable
Author

Yes Michael I am using same extension for both primary and secondary buttons, there is no explicitly defined color properties defined at front end for the extensions so its just that for active selection is marked/ highlighted as green by default but here for secondary button it dosent highlight.

Get Outlook for iOS<https://aka.ms/o0ukef>

Anonymous
Not applicable
Author

That's not what I meant.  I mean that I don't have the same extension that you use, hence I don't have colors neither for Primary nor for Secondary - all buttons are white all the time.  Can't help you with colors.

Anonymous
Not applicable
Author

Yup Michael, its 90% complete I have to use the extension to make the distinction on selection (Short/ Long) , but using the extension dose not solve my problem with the solution you shared I am facing the same issue on toggle it dosent show chart.

i am using this extension : http://branch.qlik.com/#!/project/56728f52d1e497241ae697f8

1.png

Anonymous
Not applicable
Author

I tried this extension, and noticed that the buttons turn green if the variables don't have '=' sign, but do not turn green if the sign is there.  I'd recommend you to contact the author of the extension to fix it.

Still, there is a workaround, see in the attached version.  I changed the definitions of variables removing the '=' sign.  But you still need to calculate the variables, so I had to make changes in your dimensions and expressions in the chart itself. Dimension:

=$(=pick(match($(=vMeasure),1,2,3,4),'Portfolio','identifier','Portfolio','identifier'))

Expression:

if($(=vMeasure_1)= 1 and $(=vMeasure)=1, Sum({<term={'short'}>}profit),

if($(=vMeasure_1)=1 and $(=vMeasure) = 3 ,Sum({<term={'long'}>}profit),

if($(=vMeasure_1)=2 and $(=vMeasure)=2,sum({<term={'short'}>}profit),

if($(=vMeasure_1)=2 and $(=vMeasure)=4,sum({<term={'long'}>}profit),

))))

See attached.

Anonymous
Not applicable
Author

Just when i initially open the qvf file then there is no default selection on (Short/ Long) i.e secondary button.

Once is select then it works fine I am able to toggle both ways now.

Its just there should be default select (Short/ long1.PNG) when qvf is opened.

ishanbhatt
Creator II
Creator II

Hi Chitral,

Please find the attached app.

I've used directly field name in QsVariable extension and used into the bar chart.

Dimension Variable Setting:

Dimension.PNG

Measure Variable Setting:

Measure.PNG

Bar Chart Dimension:

Dimension1.PNG

Measure1.PNG

Please note that I've changed One of Variable name Measure_1 to Dimension.

Hope this solve your problem. !

Ishan

Anonymous
Not applicable
Author

Thanks Ishan,

since we are directly referencing the name so is there way to make bar chart labels also dynamic using this way .

Like when i click on "Portfolio" and "Short" button bar chart label should be "Bottom Portfolio for Short"

and when i click on "Portfolio" and "Long" button bar chart label should be "Bottom Portfolio for Long"

ishanbhatt
Creator II
Creator II

Hi Chitral,

Try to set your default value in variable editor.

ishanbhatt
Creator II
Creator II

Currently Qliksense has no such functionality to give dynamic label naming in any object.

Anonymous
Not applicable
Author

So its basically the chart title (in appearence there is chart title that I want to make it dynamic) I was able to achieve the same. But inwantbto check with the set of variables you created.

Get Outlook for iOS<https://aka.ms/o0ukef>