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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
sirlanceohlott
Advocate III
Advocate III

Date Table Relationship Not Working

Good afternoon, 

 

I've been at an impasse for the past hour regarding a Date Table I created within a new report. 

 

I'll share what I've attempted prior to sharing DAX & images. 

 

  • Date Table is marked as the Date Table.
  • I've made sure the Date Table and any of the tables it would be connecting to are all in the same format Date/Time through the relationship pane as well as Power Query Editor.
  • I've also verified in SSMS the field it is being joined to is Date/Time. 

 

I'm not sure if this would present an issue, but the data tables are pulled in through Direct Query. 

 

Here is the DAX I utilized to make the Date Table:

 

 

Date = 
  GENERATE (
    CALENDAR( DATE( YEAR( TODAY() ) - 2, MONTH( TODAY() ), DAY( TODAY()) ), TODAY()),
    VAR startOfWeek = 1 // Where 1 is Sunday and 7 is Saturday, thus a 3 would be Tuesday    
    VAR currentDay = [Date]
    VAR days = DAY( currentDay )
    VAR months = MONTH ( currentDay )
    VAR years = YEAR ( currentDay )
    VAR nowYear = YEAR( TODAY() )
    VAR nowMonth = MONTH( TODAY() )
    VAR dayIndex = DATEDIFF( currentDay, TODAY(), DAY) * -1
    VAR todayNum = WEEKDAY( TODAY() )
    VAR weekIndex = INT( ROUNDDOWN( ( dayIndex + -1 * IF( todayNum + startOfWeek <= 6, todayNum + startOfWeek, todayNum + startOfWeek - 7 )) / 7, 0 ) )
  RETURN ROW (
    "day", days,
    "month", months,
    "year", years,
    "day index", dayIndex,
    "week index", weekIndex,
    "month index", INT( (years - nowYear ) * 12 + months - nowMonth ),
    "year index", INT( years - nowYear )
  )
)

 

 

Here is a view from the relationship pane:

Relationship Pane ViewRelationship Pane View

 

Here is the Edit Relationship View: 

relationshipv2.PNG

 

I appreciate any help in resolving this issue!

1 ACCEPTED SOLUTION
VasTg
Memorable Member
Memorable Member

@sirlanceohlott 

 

Is there any reason why you should keep dateadded and Date columns in Date/Time datatype instead of Date(mm/dd/yyyy format)?

 

Try it and let us know.

 

If this helps, mark it as a solution.

Kudos are good too.

Connect on LinkedIn

View solution in original post

3 REPLIES 3
VasTg
Memorable Member
Memorable Member

@sirlanceohlott 

 

Is there any reason why you should keep dateadded and Date columns in Date/Time datatype instead of Date(mm/dd/yyyy format)?

 

Try it and let us know.

 

If this helps, mark it as a solution.

Kudos are good too.

Connect on LinkedIn

@VasTg, it worked like a charm, I'll leave the Date/Time variation out of the mix for the time being.

 

I appreciate your help!

@VasTg I'll shift to from Date/Time to Date and see if this resolves the issue.

 

The only reason I was keeping it in Date/Time was if I wanted to do some calculations on submission times.

 

I'll let you know how it goes!

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.