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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
obriaincian
Resolver I
Resolver I

Date Table Issue

I have created a date table in Query Editor using the below code, converted it to a table and then changed data type to date

 

 

 

= List.Dates(#date(2018,12,31), 365*8, #duration(1,0,0,0))

 

 

 

 

I have another table called Test with an ID column and 2 calculated columns (2 calculated columns look up dates from a third table).

 

I have created relationships from the Test table to the date table (I have linked 2 of the calculated columns in the test table to the date table).

 

The issue I'm having is when I create a table visual with the Months and Year from the date table and add the counts of the dates from the 2 calculated columns in the Test table they are shownig the same counts for the 2 calculated columns.

 

Can someone please help, I have been stuck on this for quite awhile.

Tried to attach a sample file but no luck. Heres some Screenshots

 

obriaincian_0-1674128920623.png

 

 

obriaincian_2-1674128957402.png

 

 

 

obriaincian_3-1674128980488.png

 

obriaincian_6-1674129042479.png

 

 

obriaincian_4-1674129003417.png

 

obriaincian_5-1674129017600.png

 

 

 

 

Thanks

 

1 ACCEPTED SOLUTION
obriaincian
Resolver I
Resolver I

The issue here was only one relationship could be active between the Sheet1 table and teh Date Table at any one time.

 

The active relationship in my case was between the Date1 in the Sheet1 table and the Dates in the Date Table.

 

Solution was to adjust the Sheet1Date2 measure and call out which relationship should be used. See below

 

Sheet1Date2 = 
CALCULATE(
COUNTX(GROUPBY(Sheet1,Sheet1[ID]), COUNT(Sheet1[Date2])),
USERELATIONSHIP(Sheet1[Date2],'Date Table'[Dates]))

View solution in original post

1 REPLY 1
obriaincian
Resolver I
Resolver I

The issue here was only one relationship could be active between the Sheet1 table and teh Date Table at any one time.

 

The active relationship in my case was between the Date1 in the Sheet1 table and the Dates in the Date Table.

 

Solution was to adjust the Sheet1Date2 measure and call out which relationship should be used. See below

 

Sheet1Date2 = 
CALCULATE(
COUNTX(GROUPBY(Sheet1,Sheet1[ID]), COUNT(Sheet1[Date2])),
USERELATIONSHIP(Sheet1[Date2],'Date Table'[Dates]))

Helpful resources

Announcements
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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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