Forum Discussion
Where and how do I create a calculated column using fields from different tables
Dear Power BI community
I have looked through various posts but cannot find an answer which resolves my issue
I would like to know where and how I create a calculated column which finds the difference in days using fields from different tables.....My set set up in similar to below
Table 1:
ID
Transaction Date
Table 2 (is the table which links table 1 and 2 together and has a Many to 1 relationship with both tables)
ID
Table 3
ID
Start Date
I do not know whether to create a new metrics table OR create a calculated column in an existing table.....I am unsure of how to get the fields to be available to me choose from when writing the DAX expression
Any help would be greatly appreciated
Kind Regards
Helen
2 Replies
- amitchandakSuper User
helen_p , Expected output is not clear
You can create a new column Table 1 and Table 3 like
Start Date in Table 1 = max(filter(Table3, Table3[ID] = Table1[ID]), Table3[Start Date])
Transaction Date in Table 3 = max(filter(Table1, Table3[ID] = Table1[ID]), Table1[Transaction Date])
refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8 - v-xulin-mstfCommunity Support
Hi helen_p,
Sample data and expected output would help tremendously.
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490Best Regards,
Link