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