Forum Discussion
Anonymous
6 years agoNot applicable
CALENDAR
Hi all!
I need to get the min & max date vale from 2 or more different fact tables in order to create a dynamic Master Calendar.
I need to get the min & max date vale from 2 or more different fact tables in order to create a dynamic Master Calendar.
Any idea? I used to use "||" but seems it doesnt work right now.
Right now I have the following script:
Calendar = ADDCOLUMNS (
Calendar = ADDCOLUMNS (
CALENDAR (min(Sesiones[createDate]) ; max(Sesiones[createDate]))
Hi Anonymous ,
I created 3 date tables as a sample:
Then you need first to create a new table combing all the dates using below dax expression:
Table 2 = UNION(DISTINCT('Table'[Date]),DISTINCT('Table (2)'[Date]),DISTINCT('Table (3)'[Date]))Finally create a new table to get a calendar date containing the min date and max date:
Table 3 = CALENDAR(MIN('Table 2'[Date]),MAX('Table 2'[Date]))And you will see:
For the related .pbix file,pls click here.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
2 Replies
- Greg_DecklerCommunity Champion
I would use CALENDARAUTO.
- v-kelly-msftCommunity Support
Hi Anonymous ,
I created 3 date tables as a sample:
Then you need first to create a new table combing all the dates using below dax expression:
Table 2 = UNION(DISTINCT('Table'[Date]),DISTINCT('Table (2)'[Date]),DISTINCT('Table (3)'[Date]))Finally create a new table to get a calendar date containing the min date and max date:
Table 3 = CALENDAR(MIN('Table 2'[Date]),MAX('Table 2'[Date]))And you will see:
For the related .pbix file,pls click here.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!