Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have a text box with a background color. I would like this background color to change according to the selection : if there is at least one selection in the document vs no selection. How can I do that ?
I have found in the color parameter of the text box that I can add a "calculated" color. I guess I can do something like "if (condition, RGB (x,y,z) , RGB (x,y,z))
But I don't know which function I can use for the condition...
Thank you for your help !
if( GetCurrentSelections()>0, RGB(), RGB())
Hi Laura,
if (GetCurrentSelection() > 0, ...)
Martin
Hi,
Write the expression in the Color Area
=if (GetSelectedCount(FieldName), RGB(251,241,10) , RGB (154,123,254))
Chart Properties >> Color >> BAse color Calculated >> =if (GetSelectedCount(FieldName), RGB(251,241,10) , RGB (154,123,254))
Regards
Anand
Thank you Anan.
What if I don't want to specify a field name ? I just want my color to change if there is one selection in the document (no matter on which field) ?
Hi,
Then you can put the Or condition
=if (GetSelectedCount(Field1) > 0 or GetSelectedCount(Field2) > 0 , RGB(251,241,10) ,Green())
Regards
Anand
if( GetCurrentSelections()>0, RGB(), RGB())
you can try:
=if(sum(Aggr(sum(GetSelectedCount($Field)),$Field))>0, RGB(251,241,10) ,Green())
Hi Laura.
Here a solution for you in the text object write expression
Chart Properties >> Color >> Base color Calculated >>
=if(Count( Getcurrentselections ( ) ) > 0, QlikTechBlue() , QlikTechGray())
This works for all fields when ever any selection in the list box
Regards
Anand
The 's' was missing in your first message, that's why it didn't work.
Thank you Martin
Sorry for that