Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I don't know how far off I am but I want to use the Background Color condition of a Dimension to display Red if the Salesman has worked at our company for less than six months and green if the Salesman has worked at the company for longer. What I have is:
if( Month(Start_Date) > MonthStart(Today(- 6)), RGB(200,0,0), RGB(0,200,0))
Please could someone assist me to fix the condition so that it displays the correct colors.
Thanks,
Shane
Use
if(Month(Start_Date) > Month(Addmonths(Today(),6)), RGB(200,0,0), RGB(0,200,0))
Hi,
Use This
if(addmonths('2010-06-01',6)<today(), RGB(200,0,0), RGB(0,200,0))
Hello Shane,
Since dates are actually numeric values, you can add and substract them, so I'd use something like
If(Ceil(Num(Date(Today()) - Date(Start_Date)) / 30) < 6, RGB(200, 0, 0), RGB(0, 200, 0))
Hope that helps.
Thanks Manesh and Bhaskar.
Even I had the same requirement.
Regards,
Mandar
Hi,
Sorry use this , instead of my previous post
Use This
if(addmonths(Start_Date,6)<today(), RGB(200,0,0), RGB(0,200,0))
Hi,
Use This, if fail to work please send me ur application.
if(addmonths(Start_Date,6)<today(), RGB(0,200,0),, RGB(200,0,0))
Maneshkhot,
I've attached a copy. Thanks, I look forward to your response
Shane
Prueba creando en el Script:
Paso:
LOAD
Salesman,
addmonths(Start_Date,6) AS ff,
if(addmonths(Start_Date,6)<today(), RGB(0,200,0), RGB(200,0,0)) as V_Color
RESIDENT Invoices1;
Para la version 9 SR3, los colores en algunas lineas no se presentan, este es un problema de la tabla pivotante.