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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jdiruzza
Frequent Visitor

Date Table Relationship wrong after adding a measure

I think I'm having trouble with my relationship between my date table and my staff detail.

 

When I add Days & Snapshot Date to a table everything looks great but if I add a measure it adds a blank into the date table and duplicates the snapshot date for every line of the Date Table.  The measure I have in the example below is a simple =1 just to show the issue.  

 

My date table is created from the StaffDetail:

VAR _mindate = min('StaffDetail'[SnapshotDTS])
VAR _maxdate = Max('StaffDetail'[SnapshotDTS])

RETURN
    CALENDAR (_mindate, _maxdate)
 
RELATIONSHIP:
jdiruzza_0-1704578199684.png

 

BEFORE ADDING MEASURE:

jdiruzza_1-1704578227113.png

 

After Adding Measure:

 
jdiruzza_3-1704578344280.jpeg

 

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @jdiruzza ,

From the information given, I'm guessing the problem is in the StaffDetail table.
Please check if [SnapshotDTS] contains null values. If it does, there is no value corresponding to it in Date [Date] and the engine will automatically create a null value to correspond to these values.
Please check if these empty records make sense, and if not, consider filtering them out in powerquery.

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

Fowmy
Super User
Super User

@jdiruzza 

When you create a dates table n Popwer BI it has to have the complete dates, partial dates will cause issues. Pleas modify your calendar table as follows and try:

My date table is created from the StaffDetail:

VAR _mindate = date( year(min('StaffDetail'[SnapshotDTS]) , 1 , 1)
VAR _maxdate = date( year(max('StaffDetail'[SnapshotDTS]) , 12 , 31)

RETURN
    CALENDAR (_mindate, _maxdate)






Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.