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
adamsumm
Frequent Visitor

Creating a Month/Year relationship for use in a slicer

Hello, 

 

I have two tables that I am trying to create a relationship to.  One is my key table used as a reference table for the date.  I want the date to span multiple years (this example shows 2017 through 2018).  

 

My other table shows my incident numbers and the date which it was created on.  

 

I have tried creating a 1 to many relationship between the date column and the opened at column.  For some reason my slicer will not work.  Both columns are formated as the data type Date.  

 

powerbi1.pngpowerbi2.pngpowerbi3.pngpowerbi4.png

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @adamsumm,

 

In date table, create a [Year Month] column like this:

Year Month = DateTable[date_year]&" "&DateTable[date_num]

Also, in incident table, create a [Year Month] column:

Year_Month = YEAR(Incidenttable[Open at]) & " " & MONTH(Incidenttable[Open at])

Please remove the original relationship, re-create a one to many relationship based on [Year Month].

1.PNG

 

Result

2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @adamsumm,

 

In date table, create a [Year Month] column like this:

Year Month = DateTable[date_year]&" "&DateTable[date_num]

Also, in incident table, create a [Year Month] column:

Year_Month = YEAR(Incidenttable[Open at]) & " " & MONTH(Incidenttable[Open at])

Please remove the original relationship, re-create a one to many relationship based on [Year Month].

1.PNG

 

Result

2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Check in Query Editor if these are originally coming in as DATE-TIME data values.

 

For some reason, changing the data type from DateTime to Date sometimes won't properly truncate.

 

Instead, go to the Transform tab in the Ribbon.

Date & Time Column section

Click Date

Date Only.

 

That will properly truncate the date.

 

Let us know if this works!

 

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!

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
Top Kudoed Authors