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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Spencer
Helper II
Helper II

Dividing by column in another table

Hi

 

I have a bunch of em_codes associated with my calculated column ALRemain. I want a new column which divides the ALRemain by a value associated with the em_code (the hours column), which can be found in my EmCode Table.

What would be the best method to achieve this?

 

Thanks

AL RemainAL RemainEmCodes TableEmCodes Table

1 ACCEPTED SOLUTION
ankitpatira
Community Champion
Community Champion

@Spencer Create relationship between Hours and ALRemain table using em_code column ie 1 to many relation from Hours table to ALRemain table. Then in ALRemain table create calculated column as below,

 

='TABLENAME'[alremain] / RELATED(TABLENAME[hours])

View solution in original post

2 REPLIES 2
ankitpatira
Community Champion
Community Champion

@Spencer Create relationship between Hours and ALRemain table using em_code column ie 1 to many relation from Hours table to ALRemain table. Then in ALRemain table create calculated column as below,

 

='TABLENAME'[alremain] / RELATED(TABLENAME[hours])

Yes that's it!

Thanks very much.

Helpful resources

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