Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Color Measures

My requirement is an equation for pivot table to change the color to red when the date is expired and green if it is valid

12 Replies
Anonymous
Not applicable
Author

I need expression for date please, like:

green color = 2 months or above

red color = expired

yellow color = 1 month or less

Anil_Babu_Samineni

Try like below from BG color

If(date=expired, Green(), Red())

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Anonymous
Not applicable
Author

I need the system to know that the date is expired

Anil_Babu_Samineni

Can you come up with dataset. It would better if you explained more with data

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Anonymous
Not applicable
Author

Hi Dastan,

Use below expression,

=if($(vMonthValid)>=60,$(vGoodcolour_Green),if($(vMonthValid)<=30,$(vYellowColur),$(vBadColour_Red)))

Where vMonthValid = Date(Today())-Date(Date_Column)

          ,vGoodcolour_Green = Green()

          ,vYellowColur = Yellow()

          ,vBadColour_Red = Red()

Or you can use the Satement like RGB(64,128,115) to the the color value to variables.

Note: I have considered '>= 2months' means >=60days, '<=1month' means <=30days and all other conditions will come under Expired Date

mayuresh_d
Partner - Creator
Partner - Creator

yes, please rolf come up with data set that will help us to solve ur problem.

Anonymous
Not applicable
Author

Find attached database please

Anonymous
Not applicable
Author

click on the '+' beside your expression in expressions tab and there you can write expressions to give colours to background, text etc. There you can use any if else clause to define the colours.