translate from excel formula to power bi DAX

Viewed 42

I have this excel formula, how can I get around to translate this into a Power BI Measure in DAX. Also in excel we have the Today() function, how can I define 'today' in Power BI DAX?

=IF(ISNUMBER([@[StartDate]]), IF(ISNUMBER([@ActualStartDate]),IF([@ActualStartDate]-[@[StartDate]]>=1,"Late",IF([@ActualStartDate]-[@[StartDate]]<0,"Early","On-Time")), IF([@[StartDate]]>TODAY(),"Targeted","Running-Late")), IF(ISNUMBER([@ActualStartDate]),"Started","Not-Started"))

Just wonder Is there an Excel to DAX translator available :)

I managed to create a calculated column, as below. I wonder if it is possible to create this as a "Measure" instead.

Calc_Status_col = if(isnumber('table'[planned_start].[Date]), if(ISNUMBER('table'[actual_start].[Date]),if('table'[actual_start].[Date]-'table'[planned_start].[Date]>=1,"Late",if('table'[actual_start]-'table'[planned_start].[Date]<0,"Early","On-Time")), if('table'[planned_start].[Date]>TODAY(),"Targeted","Running-Late")), if(ISNUMBER('table'[actual_start].[Date]), "Started", "Not-Started"))

0 Answers
Related