Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

row color based on total

Hi,

Based on total we need to color the entire row.

Like if total is <10 then i need to show the entire row as red.Just like below and only for the dimension category.

Capture.PNG

Attached is the sample data.

7 Replies
bramkn
Partner - Specialist
Partner - Specialist

Calculate the total you want in a variable for easy use. And then just put in the variablename < 10. I think this is where you don't use the $() arround the variable.

Edit: Sorry its early, this won't help you. What row do you want to color? any row? based on the total of those marked columns? Don't understand what you want really. Can be me on this early morning.

nareshthavidishetty
Creator III
Creator III
Author

Hi,

If sales is < 10 i need to color the entore row as red else white.

Thanks..

bramkn
Partner - Specialist
Partner - Specialist

What row? and what total?

You mean that for example 2014 row <10 then have it red?

ruchirasamant
Partner - Contributor II
Partner - Contributor II

Hi,

Try this

Go to your expression --> expand your expression --> in background color add this condition

If((sales<10),RGB(255,100,100),))

Thanks,

Ruchira

vangurideepu
Creator
Creator

Hi

If your using the pivot or straight table, there is an two ways to change columns color

1. using condition and (for this you follow the above steps)

2 using Visual cues ( for this you can select any expression and set the upper and lower values then select the back ground color whatever you want as change the text color as you want)

kristof_j
Creator III
Creator III

And if you add this expression in the background color?

if(sum(total<Product> sales) < 10, LightRed())


background color.JPG

and disable 'Suppress Zero-Values' in the Presentation tab. Now you'll get a 0 and not a -.

suppress.JPG

This is my result

result.JPG

And play a bit with the color like 'lightred(50)' or something 🙂 that's up to you.

krishna20
Specialist II
Specialist II

Hi Naresh,

try this in expression's background color

=if(rowno()=0 or isNull(rowno()) >10

    ,rgb(255,255,0)

    ,rgb(255,255,255)

)