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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
vengadesh_p
Helper I
Helper I

One to Many Relation Ship Issue

Hello Everyone, 

I have a table like the image below 

vengadesh_p_0-1727419313656.png


Have a connection like this

vengadesh_p_1-1727419407313.png


My expected output is 

vengadesh_p_3-1727419493260.png

but I'm getting below result 

vengadesh_p_4-1727419506014.png

How can I achieve this result by using the same data model?

----------------------------------------------------------------------------------------------

Dim Table Data
ID Name

ID1XXX
ID2YYY
ID3XXX


Fact Table Data
ID Project

ID1A
ID1B
ID1C
ID1D
ID2E
ID2F
ID2G
1 ACCEPTED SOLUTION
powerbiexpert22
Post Prodigy
Post Prodigy

Hi @vengadesh_p 

please follow below steps to get the output, please see below pbix file for your reference

https://drive.google.com/file/d/16sf3HBGwfC7fN53bkeanKhMZEGN8xvjK/view?usp=drive_link

 

1. create relationhip between two tables using id column 

2. use drop down menu on name column and use count distinct as shown below

powerbiexpert22_0-1727854257381.png

3.  use the dropdown menu of id column and select show items with no data as shown below 

 

powerbiexpert22_1-1727854332916.png

 

If there are blank values in visuals, they will be hided by default. It is by design for Power BI. So, after creating relationships, you need to turn on the option "Show items with no data". 

View solution in original post

5 REPLIES 5
powerbiexpert22
Post Prodigy
Post Prodigy

Hi @vengadesh_p 

please follow below steps to get the output, please see below pbix file for your reference

https://drive.google.com/file/d/16sf3HBGwfC7fN53bkeanKhMZEGN8xvjK/view?usp=drive_link

 

1. create relationhip between two tables using id column 

2. use drop down menu on name column and use count distinct as shown below

powerbiexpert22_0-1727854257381.png

3.  use the dropdown menu of id column and select show items with no data as shown below 

 

powerbiexpert22_1-1727854332916.png

 

If there are blank values in visuals, they will be hided by default. It is by design for Power BI. So, after creating relationships, you need to turn on the option "Show items with no data". 

AnnieTay
Frequent Visitor

1. Make relationship bi-directional

2. Use ID from Dim Table in your matrix

3. Right click on ID, and select "Show items with no data"

AnnieTay_0-1727792299516.png

4. Measure:

# Name = DISTINCTCOUNT('Dim Table'[Name])
 
This is my outcome:
AnnieTay_1-1727792372396.png

 

 

 

v-tianyich-msft
Community Support
Community Support

Hi @vengadesh_p ,

 

You need to change the relationship to both:

vtianyichmsft_0-1727660836634.png

vtianyichmsft_1-1727660846383.png

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

 

AnkitKukreja
Super User
Super User

Hi! @vengadesh_p 

 

Try to remove the relationship and create it again. I see the data as you are expecting.

 

AnkitKukreja_0-1727422959704.png

 

AnkitKukreja_1-1727422984466.png

 

 

 

For Power BI trainings or support dm or reach out to me on LinkedIn.
If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.

Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904
https://topmate.io/ankit_kukreja

I need to show ID3 with a blank value, also I want to show #Name as Measure 

vengadesh_p_0-1727423460105.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.