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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Beast
Frequent Visitor

Relationship between Two Tables using Date Column

Hello, I tried to Create a Relationship using Date Column from A Table to B Table and but I am getting below result, where B Table Count is repeated for each Month.

Note: Month Column is from Table A which will also be used for Filter as well. 

Please do help me.

 

Beast_2-1674561525595.png

 

6 REPLIES 6
olgad
Resident Rockstar
Resident Rockstar

It is a general practice that you create a separate date table for your report.

Many to Many relationship often leads to confusing results. From Date table you can create ONE to MANY reölationships to both tables and use the Date columns in all your visuals and calculations.

The easiest wy to create a date table is to use this expression

Date = CALENDAR (DATE(2013,1,1), DATE(2023,12,31))  or
Date = CALENDAR (DATE(2013,1,1), DATE(Year(Today()),12,31))
depending on your data.

DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime
Beast
Frequent Visitor

@olgad  As per your suggestion I tried creating the Date Table seperately and Link between two Data Tables.

 

1. Created Date Column as per your instructions

2. Created One To Many Relation Ship (But Automatically convert as Many to One)

3. Choosen Cross Filter Direction: Single (Even I tried Both)

 

Result: Now Its not showing any Month Names.

Beast_0-1674564900252.png

 

olgad
Resident Rockstar
Resident Rockstar

Create on the Date table the column Month

Month = FORMAT([Date], "MMM")&","&'Date'[Year]and put that column into the visual

DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime
Beast
Frequent Visitor

@olgad Yes I did the same, Not working. Not sure what is the issue. Attached all the screen shots.

Date Table Forumula: Calendar = CALENDAR(DATE(2022,1,1),DATE(2023,12,31))

Month Column Formula = Month = FORMAT([Date], "MMM" &","& 'Calendar'[Date].[Year])

Beast_0-1674566030988.pngBeast_1-1674566130853.pngBeast_2-1674566184166.png

 

olgad
Resident Rockstar
Resident Rockstar

Hi, check if the relationship is active, what is the column in Table B that you are using for linking? Can you take a snapshot from Manage Relationship Window?

olgad_0-1674562152719.png

 


DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime
Beast
Frequent Visitor

@olgad  Thanks for your response. The issue occurs when you put the data in same table. 

Date and Count from Table A + Count from Table B -> In Same Table. as show in screenshot above.

 

In below screen shot - Main Table is Table A and Report is Table B. I created a relationship between startedDate - Created Date. In Cross Filter direction, I have tried all 3 options and still same results.

Beast_0-1674562922853.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.