Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Koen_D
Contributor III
Contributor III

Background green when selected

Hi Qlik experts,

I'm facing a visualisation issue, I'm close to the solution but not quite there.

My users have a table where they want to be able to select something in a pivot table, have all the rows stay as they were before selecting (so not collapsing to only the filtered fields), and have the background of the field be the same green colour as shows when selecting something in Qlik. Basically, they want to use the filtering of Qlik as a selection tool. The selections are then used elsewhere in the dashboard using GetFieldSelections().

So I want two things to happen:

1. When filtering this table, still show all the rows no matter the selection.

2. Fill the background of the filtered fields green.

I've managed to do part 1 through adding a 1 to the set analysis of the measurement. So this works.

Part 2 I managed to get working adding this to the conditional background field:

If(WildMatch(GetFieldSelections([FieldToSelect]),[FieldToSelect] >= 0, RGB(0,152,69))

The RGB color is the green that Qlik uses when selecting something. 

 

This works (and I don't really know why it works), but only if I select more than 1 field (or no fields at all). If I select 2, 3, 4, 5 fields, it works perfectly. If I select only 1 field however, somehow ALL rows get the background color. So, the wildmatch corresponds to every value.

 

Any clues on how to fix this? Is this simple a bug?

 

 

 

 

 

 

Labels (3)
1 Solution

Accepted Solutions
Aditya_Chitale
Specialist
Specialist

@Koen_D ,

Used the same expression provided by you. Its working for me even if I don't select any field value or select just 1 value.

Exp used: If( WildMatch( GetFieldSelections([FieldToSelect]),[FieldToSelect] ) >= 0, RGB(0,152,69))

Just 1  value selected:

Aditya_Chitale_0-1711536541246.png

 

selected more than 1 value:

Aditya_Chitale_1-1711536580721.png

 

no selection:

Aditya_Chitale_2-1711536610129.png

 

Regards,

Aditya

View solution in original post

3 Replies
Aditya_Chitale
Specialist
Specialist

@Koen_D ,

Used the same expression provided by you. Its working for me even if I don't select any field value or select just 1 value.

Exp used: If( WildMatch( GetFieldSelections([FieldToSelect]),[FieldToSelect] ) >= 0, RGB(0,152,69))

Just 1  value selected:

Aditya_Chitale_0-1711536541246.png

 

selected more than 1 value:

Aditya_Chitale_1-1711536580721.png

 

no selection:

Aditya_Chitale_2-1711536610129.png

 

Regards,

Aditya

Koen_D
Contributor III
Contributor III
Author

Hi Aditya,

Then I guess it actually is a bug on the patch we're working on (August 2023 patch 9). Patching is always at least 6 months behind. Thank you for verifying the code actually working.

Regards,

Koen

emilyrabbit
Contributor III
Contributor III

Hi I met the same request . And I am stuck in Point 1 , could I know how to set point 1 ?

and where to set point 2? Because I have a lot of measures in my pivot . Should I set the background color one by one measure ? Thanks .