Forum Discussion
DataFormat.Error: We couldn't convert to Date.
- Anonymous9 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,
Hi,
Actually I am trying to perform this calculation using columns from multiple tables
I tried the solution but it is still giving me the same error, is it because of the fact that the data is coming from two tables.
I tried doing it with DAX calculation as well but it is giving me error when I am trying to reference a column from a different table even though I have established a relationship between them.
Column = IF(TODAY()<=Table2[C_DATE],0,IF(Table1[E_DATE]=Table2[C_DATE].[Date],0,1))
The underline denotes the error.
Why is it giving me an error for columns from seperate table even after a relationship is established between both?
Kindly help.
Thanks in advance,
Rahul.
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,