Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jctorres
Contributor II
Contributor II

How to create reports by applying colors to specific fields

Good morning.
I am trying to make a report, where I can identify the contracts that rent properties and color the fields in red the properties or contracts that have not increased their rent each year that their contract is renewed, the profitability of the property increases each year.
So I need to identify with a red color the properties that have not increased their profitability after a year. and mark only the field where the increase in income is not displayed.

I am using a pivot report.

Could you tell me how I can apply those colors?

Annex image of an example.

I appreciate your support.
Greetings.

jctorres_0-1734969547638.png

 

Labels (1)
5 Replies
diegozecchini
Specialist
Specialist

Hi!
In the "Background Color" setting for the measure you want to apply colors to write an Expression for Conditional Coloring:

example
IF(
Column(1) <= Above(Column(1)),
RGB(255, 0, 0), // Red color
RGB(255, 255, 255) // Default (white)
)

Replace Column(1) with the actual column reference or measure you're using and use Above() to compare the current value with the value from the previous year.

jctorres
Contributor II
Contributor II
Author

Hello diegozecchini
Thank you for your support, a contract increases profitability every year, so, for example, if I started collecting rent in January 2020 and in January 2021 I did not increase its profitability and it remains the same, then in that field, color red, otherwise do not color. , and the example that you shared with me colors all the values ​​that are the same month by month and would be by year.
Example annex.

jctorres_0-1734974120861.png

 

diegozecchini
Specialist
Specialist

Hi!

I am not sure but if you want to limit comparison to same contracts I try to adjust the expression:

IF(
Contract = Above(Contract) AND Column(1) <= Above(Column(1)),
RGB(255, 0, 0),
RGB(255, 255, 255)
)

Kaushik2020
Creator III
Creator III

Please use condition in below property for the measure. inside the Background color expression, you can use if conditions to decide the condition same as below syntax.

if(condition = True, '#8FD14F','#D91656')

kaushi2020_0-1735197204541.png

 

 

 

diegozecchini
Specialist
Specialist

Exactly!