Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not 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.

Any idea? I used to use "||" but seems it doesnt work right now.
 
Right now I have the following script:
Calendar = ADDCOLUMNS (
    CALENDAR (min(Sesiones[createDate]) ; max(Sesiones[createDate]))
1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi  @Anonymous ,

 

I created 3 date tables as a sample:

Annotation 2020-04-17 165929.pngAnnotation 2020-04-17 165952.pngAnnotation 2020-04-17 170010.png

 

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:

Annotation 2020-04-17 171817.png

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

 

View solution in original post

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi  @Anonymous ,

 

I created 3 date tables as a sample:

Annotation 2020-04-17 165929.pngAnnotation 2020-04-17 165952.pngAnnotation 2020-04-17 170010.png

 

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:

Annotation 2020-04-17 171817.png

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

 

Greg_Deckler
Community Champion
Community Champion

I would use CALENDARAUTO.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.