Expand my Community achievements bar.

SOLVED

Project Report | IF statement not working properly for custom column

Avatar

Level 2

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

2 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 2

@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.