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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anish76
Frequent Visitor

Value of another table

I have table in power bi with FCM_Shift with columns (Name(Text Format) Check In (Time Format)  Check Out(Time format) Date Another Table Attendance Details_Afterhours with Columns (Name(Text Format) Check In (Time Format) Check Out(Time format) Date These two tables are many to many relationship (Name column), Now I want to add one more column in FCM_ shift table which will have the value of Check IN Columns value of Attendance table.
 
Names are reapeated in both tables.
 
Anish76_0-1701783621512.png`Anish76_1-1701783710921.png

 

 

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @Anish76 ,

You can create a calculated column as below the table 'FCM_Shift'':

Column =
CALCULATE (
    MAX ( 'Attendance Details_Afterhours'[Check-In] ),
    FILTER (
        'Attendance Details_Afterhours',
        'Attendance Details_Afterhours'[Name] = 'FCM_Shift'[Name]
            && 'Attendance Details_Afterhours'[Date] = 'FCM_Shift'[Date] //add another conditions
    )
)

 

If the above one can't help you get the expected result, please provide some raw data in the table  'Attendance Details_Afterhours' and 'FCM_Shift' (exclude sensitive data) with Text format and your expected result with specific examples. Is there any restrictive relationship between these two tables other than the field [Name], such as 'Attendance Details_Afterhours'[Shift] and 'FCM_Shift'[Shift Timings] & 'FCM_Shift'[Shift Group]? It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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

View solution in original post

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @Anish76 ,

You can create a calculated column as below the table 'FCM_Shift'':

Column =
CALCULATE (
    MAX ( 'Attendance Details_Afterhours'[Check-In] ),
    FILTER (
        'Attendance Details_Afterhours',
        'Attendance Details_Afterhours'[Name] = 'FCM_Shift'[Name]
            && 'Attendance Details_Afterhours'[Date] = 'FCM_Shift'[Date] //add another conditions
    )
)

 

If the above one can't help you get the expected result, please provide some raw data in the table  'Attendance Details_Afterhours' and 'FCM_Shift' (exclude sensitive data) with Text format and your expected result with specific examples. Is there any restrictive relationship between these two tables other than the field [Name], such as 'Attendance Details_Afterhours'[Shift] and 'FCM_Shift'[Shift Timings] & 'FCM_Shift'[Shift Group]? It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.