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))
PVO3
Impactful Individual
4 years agoQuickfix; dont use DATEDIFF. This returns all dates between given dates, not the arregrate.
Perhapse something like
INT('Ideal Due Date'[Fixed Deadline] - 'Ideal Due Date'[Start date])