Skip to main content
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())

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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.