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
DevadathanK
Resolver I
Resolver I

Alternative for RELATED function - Unable to connect tables (many to one address)

Hello everyone

<Message removed>

Thanks for any help!

1 ACCEPTED SOLUTION

Hi @DevadathanK 

 

Kindly check this one?

Week 1 Efficiency = DIVIDE([Week1],[Hours]*(5-[Measure]))

002.PNG 

Sample attached.

 

Community Support Team _ Dina Ye
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

5 REPLIES 5
v-diye-msft
Community Support
Community Support

Hi @DevadathanK 

 

Please kindly let me know if you'd like to get below results:

Measure for the number of days the person is on leave in week1:

 

Measure = CALCULATE(SUM('Table (2)'[Days]),FILTER(ALL('Table (2)'),[To Week No.]=1&&[From Week No. ]=1),VALUES('Table (2)'[Employee ID]))

 

 

 

 Calculated column for Week 1 Efficiency

 

Week 1 Efficiency = DIVIDE([Week1],[Hours])*(5-[Measure])

 

05.PNG

Pbix attached.

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

Hey @v-diye-msft 

 

Thank you very much for trying to help me out! 

<Message deleted>

I shall try out some other calculation algorithm, using the Measure functionality as you suggested.

Hi @DevadathanK 

 

Kindly check this one?

Week 1 Efficiency = DIVIDE([Week1],[Hours]*(5-[Measure]))

002.PNG 

Sample attached.

 

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

This works out well @v-diye-msft Thank you! 

 

However when the Leaves applied become more complex, spanning multiple weeks, it brings out other challenges. 

Since you have answered this post, i have made a separate post for addressing the other issues.

 

Please have a look if you get time! 

https://community.powerbi.com/t5/Desktop/Unable-to-create-a-column-by-looking-up-values-in-a-another...

 

Thanks again!

 

Greg_Deckler
Super User
Super User

So, try using RELATEDTABLE instead of RELATED. You should be able to do something like FILTER(RELATEDTABLE(...)...)


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

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.