Forum Discussion
Adam01
Advocate I
4 years agoCalculating Date Diff based on blank columns
Hello everyone, I have a bit of an odd one today I am trying to create a custom column that calculates that date diff between todays date and EITHER the "Ideal Due Date" Column OR the "Fixed Dead...
- Anonymous4 years ago
Hi,
Try the below solution
Days until Deadline = -- Returns true if both columns are blank var CheckBlanks = ISBLANK('Table'[Ideal Due Date]) && ISBLANK('Table'[Fixed Deadline]) -- Returns the difference prioritising Fixed Deadline column var DaysDiff = int(TODAY() - COALESCE('Table'[Fixed Deadline], 'Table'[Ideal Due Date])) return if(CheckBlanks, "No Deadlines set", CONVERT(DaysDiff, STRING))
Anonymous
4 years agoNot applicable
Hi,
Try the below solution
Days until Deadline =
-- Returns true if both columns are blank
var CheckBlanks = ISBLANK('Table'[Ideal Due Date]) && ISBLANK('Table'[Fixed Deadline])
-- Returns the difference prioritising Fixed Deadline column
var DaysDiff = int(TODAY() - COALESCE('Table'[Fixed Deadline], 'Table'[Ideal Due Date]))
return if(CheckBlanks, "No Deadlines set", CONVERT(DaysDiff, STRING))
- Adam014 years ago
Advocate I
Thank you! This is exactly what I was after!