Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!
SOLVED

Project Report | IF statement not working properly for custom column

Avatar

Level 3

Hello. I am building a project report to count how many projects are created as new vs update to capture the trend over time. To determine what is new vs an update, I decided to create a custom column with an IF statement to compare the project Entry Date and Last Update Date. 

 

Text Mode:

displayname=New or Update
textmode=true
usewidth=true
valueexpression=IF({lastUpdateDate}!={entryDate},"Update","New")
valueformat=html

 

The column displays values but its not working properly. As you can see from the screenshot, its categorizing everything as Update when the two highlighted lines should be "New". I have tried adjusting the =, >, <  as well as using CLEARTIME and WEEKDAYDIFF, but it seems to ignore the IF statement and mark everything as "New" or "Update". 

 

AnnieXLe_0-1704407472044.png

Does anyone have any suggestion on what may be the issue? Or is there a better way to build the report that I need? 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

@AnnieXLe The CLEARTIME function should work, you just have to add it to both sides of the expression. I tried it in my instance and it works as expected. 

displayname=New or Update
textmode=true
usewidth=true
valueexpression=IF(CLEARTIME({lastUpdateDate})!=CLEARTIME({entryDate}),"Update","New")
valueformat=HTML

 

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

@AnnieXLe The CLEARTIME function should work, you just have to add it to both sides of the expression. I tried it in my instance and it works as expected. 

displayname=New or Update
textmode=true
usewidth=true
valueexpression=IF(CLEARTIME({lastUpdateDate})!=CLEARTIME({entryDate}),"Update","New")
valueformat=HTML

 

Avatar

Level 3

@NicholeVargas thank you so much! I was using CLEARTIME to bracket both {lastUpdateDate} and {entryDate}. Anyways, placing the CLEARTIME in both sides of the expression did help to tag each entry correctly.

Avatar

Community Advisor

 

Glad this worked for you @AnnieXLe,

 

Thanks for pinging me about this one @KatherineLa; this is indeed a good example of the CLEARTIME functionality, noting (hair-splittingly) that a project updated throughout the day it was first entered will then still be considered "New" until its lastUpdateDate is triggered on a subsequent day, when it will then and thereafter be considered "Update".

 

Which might be Just Right.

 

Regards,

Doug