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: 
Frédéricdh
Creator II
Creator II

Background Color

Why, when I tag the Option Suppress the Zero Value in Presentation, the background is not the same??

 

See the image:

Frdricdh_0-1718097089722.png

 

Frdricdh_2-1718097143458.png

 

Labels (1)
6 Replies
theoat
Partner - Creator III
Partner - Creator III

Hi

Can you give more information about the color expression used?

Enjoy your Qlik.

Kind regards,
Théo ATRAGIE.

Frédéricdh
Creator II
Creator II
Author

The expression is like: Pick(Match(Only(<> ORT)))

TauseefKhan
Creator III
Creator III

Hi @Frédéricdh,

It can affect the background color because the cells with zero or null values are not displayed, and therefore, the background color expression may not be applied.

// Apply dynamic background coloring
LOAD *,
IF(
NOT IsNull(Only(ORT)) AND Only(ORT) <> 0,
Pick(
Match(Only(ORT), 10, 5, 15),
RGB(255,0,0), RGB(0,255,0), RGB(0,0,255)
),
RGB(200,200,200)
) AS BackgroundColor
RESIDENT YourTable;

Hope this resolve your issue.
When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions").

Frédéricdh
Creator II
Creator II
Author

I don't really understand

TauseefKhan
Creator III
Creator III

When you use the option to suppress zero values in the presentation of a table, it can affect the background color because the cells with zero or null values are not displayed, and therefore, the background color expression may not be applied to them.

To ensure that the background color is consistent, even for cells with zero or null values, you can modify your script to handle null values explicitly.

Frédéricdh
Creator II
Creator II
Author

Sorry, I don't understand what you do.

why you make a load?

And the you test the value if it's a zero or not but the problem for me, is the background of the title, not the value of the title.