Forum Discussion
How to join two virtual tables in DAX
- 2 years ago
You don't need to/shouldn't copy the table twice. You should load the table once containing all the data. All of it, not just the 2 months you are interested in, but all history you may ever need for reporting. Then join to a calendar table containing all dates for the superset of dates including dates with no sales.
Hi Matt,
I did as you said- I copied the LOANHIST table twice and labeled them T1RE and T2RE. Then i merged them based on the Loan #.
This DAX...:
...successfully gives me this table...:
...if I filter the tables in Power Query by Accounting Date:
01/31/2019 for T1 and
02/28/2019 for T2.
The tables are both connected to the date calendar:
How would I modify the DAX to be able to 1) unfilter the tables in PQ, and 2) fill in a table like this:
This table is the goal.
I know CALCULATE must be involved, but I don't know how to structure the formula.
You don't need to/shouldn't copy the table twice. You should load the table once containing all the data. All of it, not just the 2 months you are interested in, but all history you may ever need for reporting. Then join to a calendar table containing all dates for the superset of dates including dates with no sales.