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

Need help with Table Relationship

I have developed a Power BI Dashboard, with headcount table, joiners and leavers for a month.

The dashboard was working fine when I had just one month data on the dashboard (June) , now since I have added the second month data (Which has almost similar values such as employee ID,Employee name...etc), after the duplicate values came, the relationship which I had with the Headcount Table and the New Joiners which was (One to Many ) had been changed to Many to one and the values are not showing correctly.

 

akashpadmakumar_0-1629029017872.png

 

Kindly let me know what relationship need to be set to get the dashboard show correct values ?, its just the joiners and leavers have this issue.

 

 

 

1 ACCEPTED SOLUTION
PC2790
Community Champion
Community Champion

Is the New Joiners table expected to have duplicate values?

I mean how can an employee join twice, once in june and other in July?

If it is acceptable as per your data model, then you would have to look for some other field to create a relationship on.

Or else, create a bridge table with all the unique values of employee between New Joiner and Headcount and create a relationship of the two tables with the bridge table.

It's always better to have information related to employee in a separate table.

View solution in original post

8 REPLIES 8
PC2790
Community Champion
Community Champion

Is the New Joiners table expected to have duplicate values?

I mean how can an employee join twice, once in june and other in July?

If it is acceptable as per your data model, then you would have to look for some other field to create a relationship on.

Or else, create a bridge table with all the unique values of employee between New Joiner and Headcount and create a relationship of the two tables with the bridge table.

It's always better to have information related to employee in a separate table.

aj1973
Community Champion
Community Champion

Hi @akashpadmakumar 

Try changing the direction of the relatioship to both.

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

I did try that, but it is not working

In that case I don't see why you are pointing that the cause is the relationship! Did you open power query and check for issues? Then did you DAX? Are your DAX formula correct? You see it could be different causes. 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

The graphs where showing all correct values until I put in July month data appended to june data, this obviousl ywill have duplicte values and the values are not showing correct after that. I can attach the visuals as well. 

The Dax calculations are all correct

 

akashpadmakumar_0-1629031022418.png

 

The source, CSV? How did you append the sources? Did you use power query? 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

No it was an excel file, I just appended the next months values, which has june duplicate values as well to it manually, cause I wanted to show the values of june and july in the dashboard.

Manually!!!!

We can speculate all day long my friend. Share your file and we can help much faster.

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

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.