This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hello! I'm trying to add conditional formatting to a weekly report to ensure comments are addressed within two weeks. I have attached a sample typical weekly report. For each unique ID, I want to calculate the difference between the last modified date for that ID and the first creation date for that ID. If it's >14 days, I'd like the cell to turn red, if not, it can stay white or turn green.
Adding a new column "Within SLA" with a "yes" (<14 days) or "no" (>14 days) would also work.
I would worry about conditional formatting once the data has been output to excel or another consumption layer. For your alternative ask, I've attached a workflow. In summary, simply change the two fields with datetimes to a DateTime format (because it's a CSV, alteryx will read them in as strings). Then with the summarize tool, group by the ID and select "First" for the Create Time field then "Last" in the Modified Time field. Then with the formula tool, use thedatetimediff expression to bring back days as the unit. Then finish it with the conditional statement. Hope this helps!
One more question: I now want to only calculate the "Days Difference" if the comment has been marked as "Resolved" in the "State" column. I tried altering the original formula, but I'm getting an error due to the data type being a string rather than integer.
if [State] = 'RESOLVED' then DateTimeDiff([Last_Modify Date],[First_Create Date],'days') else 'N/A: Open Comment' endif
Do you have any ideas on how I could solve this error?