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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
nj17
Helper III
Helper III

Make Calendar dates in sync with model dates

 

Hi all,

In my model i have data only for october 2021 but when i take dates from calendar table it shows me all year and months.I want to see the year and months present in my model.

how can i make the calendar table dates in sync with my model.I generated this calendar table through M query and have a relationship with two of the tables in model.         @Greg_Deckler @amitchandak 

nj17_2-1653453325913.pngnj17_0-1653453262169.png

         Thanks,

Nj                                

 

 

 

   

5 REPLIES 5
PC2790
Community Champion
Community Champion

Hey @nj17 ,

 

If you are looking to do it Power Query itself,

You can use:

StartDate = List.Min(YourTable[DateColumn]),
EndDate = List.Max(YourTable[DateColumn])

 

Refer this to have step by step illustration of the same.

 

Hi @PC2790 

I have multiple tables, i cant create date table based on a single table from my model.I need to use a dim Date table which I am using but the Date table is not in sync with dates available in Model

danextian
Super User
Super User

Hi @nj17,

You can create a calendar in DAX that is based on the earliest and latest date in your other tables.

CALENDAR =
CALENDAR ( MIN ( Table[Date] ), MAX ( Table.Date ) )




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian I know I can create this but i want to know how can i do it in Date table itself

Hi @nj17 ,

 

If you want to edit  your Dates table, you have two options:
Power Query - Filter the date column dynamically so based on the earliest and latest date in your Fact table with these filter criteria - each [Date] >=List.Min ( Fact[Date] ) and [Date] <=List.Max ( Fact[Date] ). How fast this approach depends on how big and fast your data source connection is.

DAX  - create a calculated column to identify whether a date in the Dates table is within the min and max dates of the Fact Table.

Indicator =
Dates[Date] >= MIN ( Fact[Date] )
    && Dates[Date] <= MAX ( Fact[Date] )

This will return a True/False value. You can use this in the filter pane to filter the whole report or just  specific pages/visuals.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors