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
FCF
Helper IV
Helper IV

relationships between 2 tables

Hi I have two tables that i cam trying to create a relationship with. each time i set it up with a new column that i have created in both tables i can see some data but not the complete list.

i have creaded a column in both tables called Key1 that has the following creteria.

Key1 = ([Date]&[Week]&[Year])
 
with this i have set up the relationship, but it is not pulling or displaying properly. any help would be greatly appreciated. thanks
6 REPLIES 6
amitchandak
Super User
Super User

@FCF , to me date itself is a key, unless it not aproper date. Also in case, they are transactional table, you should join both with a date table.

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Appreciate your Kudos.

Greg_Deckler
Super User
Super User

@FCF - Hard to say, what are you seeing? Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ 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...

hi this is the sample data of what is in the tables

table 1 havatec

havatec.GIFpicking.GIFkeys.GIF

 

 

report.GIF

 

when  i select the activity Havatec the column Havetec-Stem/hr should display a value, and it does

the problem is that all activities are displaying the havatec value, and they should be at 0

Hi @FCF ,

 

What's in your Havetec-Stem/hr ? Would you please show us more details by sample pbix file? It is quitely difficult to figure it out with your description.

 

Please do mask sensitive data before uploading.

 

Thanks for your understanding and support.

 

Best Regards,

Dedmon Dai

hi

this sample may help

1. i have selected the date 07/0//2020

2. Fiscal year F21

3. Activity slicer is Havatec

4.results in the table show correct as follows

date 07/08/20, Emp = Neeson, Matt, pieces = 0 , Waste =0, Hrs= 3.71 ( total hrs on the task havatec) Actitivy = Havatec, Processed = 15813 Havetec-Stems/Hr = 2051.19. this is correct if you devide processed 15813 by Hrs 7.71 the result is 2051.19

screen1.GIF

the problem is in the relationship, if i change the Activity from Havatec to Picking the column "Processed" and Havetec-Stems/Hr should be 0

same date, but different activity

not that peices, waste have values because they are associated to the activity "Picking"screen2.GIF

i have created a relationship column called "key1" that is in all 3 tables

Key1 = ([Date]&[Wk]&[Yr])
relationship column.GIF

i am not clear on how to upload the .pbx file.

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.