Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

DateDiff with multiple ISBLANK

Hi,

 

Could somebody please help me to convert my SQL to DAX below?

 

Sum(case when DateDiff(month, @ReportPeriodStartDate, TDate) < 0 AND

DateDiff(month, @ReportPeriodStartDate, Isnull(WDate, IsNull(CDate, @ReportDate))) > 0 then 1 else 0 end)

 

I have 

DIM =
VAR ReportPeriodStartDate = DATEADD(vwtest[DateUpdated],-1,MONTH)
 
RETURN
IF(DATEDIFF(ReportPeriodStartDate, vwtest[TDate],MONTH) < 0 &&
 
DATEDIFF(ReportPeriodStartDate,ISBLANK(vwtest[WDate]),ISBLANK(vwtest[DateU],MONTH) > 0,1,0)
 
 
Its not displaying correctly. Its the isnulls that I'm struggling to convert I think
 
Any help would be greatly appreciated.
 
Thanks
 
Liam


  • Anonymous, I doubt your the usage of is blank in place of isnull, From March release power bi supported coalesce , please use that

4 Replies