Forum Discussion

ranambia's avatar
ranambia
Regular Visitor
9 years ago
Solved

DataFormat.Error: We couldn't convert to Date.

Hi all,   THis is Rahul, I am new to Power BI desktop and this is my first post. I have been trying out Power Bi Desktop for some days now as we are contemplating of using Power Bi on a large scale...
  • Anonymous's avatar
    Anonymous
    9 years ago

    ranambia,

    Using M code, you are not able to reference different table in the formula, you can merge the two tables in a single table, then perform your calculation using M.

    Alternatively, change your DAX to the following code to get expected result.
    Column = IF(TODAY()<=Table2[C_DATE],0,IF(Table2[C_DATE]=RELATED(Table1[E_DATE]),0,1))

    Regards,