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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lukaspowerbi
Helper II
Helper II

Linking calendar table and my own table by Month and Year column

I want to create a relationship between two tables, MonthTable and FY18 Table. 

I created MonthTable below with a Year-Month column that has unique values:


Capture.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Now, I would like to create a relationship with FY18 table which is a little bit tricky. The FY18 table is brought into power bi in multiple .xlsx files, each file represents one month and I created a conditional column based on its source name.

I basically need to create a column based on source name with the same format that I have in my MonthTable.

I already created a conditional Year Month Column but it's not the right format. Can anyone help? Thank you.

Capture.JPG

 

 

 

 

 

 

9 REPLIES 9
v-cherch-msft
Employee
Employee

Hi @lukaspowerbi

 

You may try to link the two table between the New Year Month column and Year-Month column. Here is the document for you.

 

https://docs.microsoft.com/en-us/power-bi/desktop-create-and-manage-relationships

 

Regards,

Cherie

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

Thanks, that's what I tried but for some reason doesn't work. I have One to Many Relatonship

My MonthTable with unique values in a Year-Month column:
Capture.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

My FY18 Table with Year Month column

Capture.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

Both columns are text, I tried Data type too but didn't work. 

 

 

 

 

When you say it doesn't work, can you be more specific? It doesn't allow you to create the relationship? You aren't getting the correct values in some visual?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Super User
Super User

You probably need to specify that your Year Month column is Text in your second table. 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

It doesn't seem to work. It allowed me to create 1 to many relationship but tables don't communicate at all. 

Setting up both columns allowed me to create it but it won't work in my slicer.

Create a new column with the formula:

New Year Month = YEAR([Year Month]) & " " & MONTH([Year Month])

Use that to link your tables.

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

I created the column but it didn't help. I think the issue is wth my FY18 table not the calendar. 

 

Can you supply source data that can be copied and pasted or a PBIX file? This should be pretty straight-forward.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

I think it's my FY18 and creating that conditional column based on Source.Name column.

 

Here is the file:

https://www.dropbox.com/s/82fvcvby74gc3n3/Trend%20Test.pbix?dl=0

 

I appriciate your help!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors