Forum Discussion
Combine date information different tables Direct query
- 9 years ago
Hi ilana105,
In order to solve this I have tried different solutions:
- Create an intermediate table with all dates and use it to link both tables. However, I can´t create a table in Power BI when importing directly with direct query
What data source are you using with direct query model? Is it possible for you to create the Intermediate Calendar table on the data source side(like in a SQL DB)?:smileyhappy:
In order to solve this I have tried different solutions:
- Calculate the information from the second table using the "Calculate" function, but this doesn´t work.
Have you tried using a similar formula like below to create a measure to calculate aggregate value from another table? It should work in this scenario.:smileyhappy:
SumOfInventory = CALCULATE ( SUM ( Table2[Inventory] ), FILTER ( Table2, Table2[Year] = MAX ( Table1[Year] ) && Table2[Month] = MAX ( Table1[Month] ) ) )Regards
Hi ilana105,
In order to solve this I have tried different solutions:
- Create an intermediate table with all dates and use it to link both tables. However, I can´t create a table in Power BI when importing directly with direct query
What data source are you using with direct query model? Is it possible for you to create the Intermediate Calendar table on the data source side(like in a SQL DB)?:smileyhappy:
In order to solve this I have tried different solutions:
- Calculate the information from the second table using the "Calculate" function, but this doesn´t work.
Have you tried using a similar formula like below to create a measure to calculate aggregate value from another table? It should work in this scenario.:smileyhappy:
SumOfInventory =
CALCULATE (
SUM ( Table2[Inventory] ),
FILTER (
Table2,
Table2[Year] = MAX ( Table1[Year] )
&& Table2[Month] = MAX ( Table1[Month] )
)
)
Regards
- ilana1059 years agoHelper I
Hello v-ljerr-msft
Finally I have created an intermediate calendar table and everything is linked through that table
- v-ljerr-msft9 years agoMicrosoft Employee
Hi ilana105,
Great to hear the problem got resolved! Could you accept your last reply as solution to help others who has similar issue easily find the answer and close this thread?:smileyhappy:
Regards