Forum Discussion

markefrody's avatar
markefrody
Post Patron
2 years ago
Solved

Cannot Select Columns or Other Tables

Hi,

 

I am trying to compute the days difference between two dates using DAX. These two dates are located in different tables. The problem is when I input the DAX it does not show the other table and its fields.


DAX should be: Ship Date - DateReceiveDateTime = DATEDIFF('TABLE 1'[ShipDate], 'TABLE 2'[DateReceivedDateTime], DAY)

In screenshot below, TABLE 2 is not appearing.

 

I already set-up the relationship between these two tables but still cannot detect the other table when using DAX.

 

Here is the pbix [file] for reference. 

 

Appreciate if you can help me. Thanks in advance.

Best regards,

Mark V

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  markefrody,

    It doesn't seem to have anything to do with relationships. Calculated columns are suitable for single-table calculations. As shown in the figure, you created in Table 1, so all the fields in Table 1 are included. So you need to use measure to do that.

    Hope it helps!

    Best regards,
    Community Support Team_ Tom Shen

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

     

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  markefrody,

    It doesn't seem to have anything to do with relationships. Calculated columns are suitable for single-table calculations. As shown in the figure, you created in Table 1, so all the fields in Table 1 are included. So you need to use measure to do that.

    Hope it helps!

    Best regards,
    Community Support Team_ Tom Shen

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.