dateDiff Conditional on Value of Third Dimension

I’ve added a dateDiff calculated field to a pivot table using a dimension from the underlying dataset and ‘now’ as the two date fields.

I also want the dateDiff field results to be conditional based on the data from a third dimension (ie, if the third dimension contains data, the dateDiff results are ‘null’).

Is this possible???

@hopeah - I believe that should be do-able using the ifelse construct as it helps us to derive anything conditional. A bit of sample of dataset or your calculation logic would really help to replicate at my end to provide you a more accurate and relevant response. Thank you!

Thanks for your response!

Please see attached screenshot. I have created calculated fields for the ‘Time to Closure’ and ‘Days Investigation Open’ columns using ‘dateDiff(dateinvestigationinitiated, xxxx, “DD”)’.

I need the results in ‘Days Investigation Open’ to show as N/A where the ‘Time to Closure’ column contains a numerical value.

@hopeah - You can try to use a conditional ifelse construct along with tostring function to get your desired result.

The expression of the new calculated field could be something like

ifelse({Time to Closure} > 0, ‘N/A’, tostring({Days Investigation Open}))

Hope this helps!

@sagmukhe - that’s done the job, thanks very much for your help!

I am glad that it helped you. Can you please then mark my post as Solution so that it closes this thread and help other community members to find solution to similar problems. Thank you!!