Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sindu_bharathi
Partner - Contributor III
Partner - Contributor III

How to dyanamically change the individual cell color os a Pivot table

Hi All

I have a requirement to dynamically change the individual cell color of a Pivot table

I have a Slider objects for different filters which are used as dimension in the Pivot Table. When I change the slider values the dimension values will change in the Pivot table. 

Here I have three different slider objects for AA,BB,CC.

      1.My requirement is when I change SliderAA the cell value of AA

     should have either Blue background or font color of the cell should change from black to blue and all other cells should have black .

      2.When I change SliderBB the cell value of  BB

     should have  either Green background or font color of the cell should change from black to Green and rest should have black.

    Likewise for rest of the dimension values.

DimensionExpression
AA1
BB2
CC3

Please give me your suggestions on this.

Regards,

Sindu


3 Replies
jagan
Luminary Alumni
Luminary Alumni

HI,

Try like this

Properties -> Expression -> Click on expression -> Expand + sign -> Background color-> and give below expession

If(Dimension = 'AA', RGB(0, 0, vAAVariable),

If(Dimension = 'BB', RGB(0, vBBVariable, 0), RGB(0, 0, 0)))


Hope this helps you.


Regards,

Jagan.

sindu_bharathi
Partner - Contributor III
Partner - Contributor III
Author

Jagan,

Background option will change the color of the entire column when any one of these conditions are satisfied

but here i need to change the color of a single cell dynamically.

Regards,

Sindu

jagan
Luminary Alumni
Luminary Alumni

Hi,

If you share sample file and explain your requirement clearly then it would easier to give solution.  If you want to apply background color for a specific cell then you have use condition like below

=If(DimensionName = 'Some Value', RGB(0, 0, vAAVariable))

Hope this helps you.

Regards,

Jagan.