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
Anonymous
Not applicable

Connect Month names formated as Text to Month names in the date table

I have a text column that contains month names in the format "mmm". Additionally there is a date column for the year. The months in the date column and the months in the text column do not have to be identical.

I now want to link this text column with the month names in the calendar table. But it does not accept this as a correct relationship. So what to do?

How can I tell Power BI that the texts are month names, so I can then process them as such.

 

4 REPLIES 4
HotChilli
Super User
Super User

"it does not accept this as a correct relationship" - what message do you get?

 

Maybe you can show us.

Anonymous
Not applicable

RolWmh_0-1618564364283.png

Here the error message in English: This relation has a cardinality of m:n. This may only be used if no column (neither "month" nor "month name") is expected to contain unique values, and if the significantly different behavior of m:n relationships is known. 

Hi @Anonymous 

It is a warning message which will appear when you want to create a many-to-many relationship between two tables. If you are sure to create a many-to-many relationship, you can go on to save this relationship. You may want to learn more about many-to-many relationship before using it: Many-to-many relationships in Power BI DesktopMany-to-many relationship guidance.

 

Hope this helps.

Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

Actually, that is a warning and not an error.  It is good practice to avoid many to many relationships.  Since both tables have multiple rows for each Month, a M:M is necessary.  To avoid it, you would need to create a Month table (1 row/month) or add a column with the first/last of that month and use that new column in a relationship with the DaxKalendar[Datum] column.

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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