Forum Discussion
how to use date form different tables (Direct Query)?
- Anonymous9 years ago
Hi Jolyon,
Yes. You would need to create the new table in CRM, as we are not able to use "New table" feature in DirectQuery Mode.
Thanks,
Lydia Zhang
Hi BetterCallFrank
thanks for the answer. But i have then another question:
since I use direct query, I can not create new table in this mode - main problem.
Besides, if I use CALENDAR function, i should know start and end date in advance,is it correct?what if i cannot know, which table contains start date and end date?or it may change from time to time.
( this is only example of CALENDAR function,that I found:
=CALENDAR (DATE (2005, 1, 1), DATE (2015, 12, 31))
or
=CALENDAR (MINX (Sales, [Date]), MAXX (Forecast, [Date])))
Hi PavelR do you have probably any idea about this problem?
Regards,
Jolyon
Hi Jolyon,
I agree with solution described by BetterCallFrank.
To solve CALENDAR function parameters, just include IF formula condition to input MIN and MAX dates from both table. Something like depicted below:
DateTable = CALENDAR(IF(MIN(Table2[Column1])>MIN(Table1[Column1]);MIN(Table1[Column1]);MIN(Table2[Column1]));IF(MAX(Table2[Column1])>MAX(Table1[Column1]);MAX(Table2[Column1]);MAX(Table1[Column1])))
Regards.
Pavel