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
fahadkhan
Frequent Visitor

Calculating Leaves Based on Project - Data Model (Schema) Help!

Hi Everyone,

 

I have encountered a situation where i cant seem to find logic for a solution. so here is the sinario

 

I have 3 Tables: Date, Attendance and Project. 

 

Here is the model I have made.

 

fahadkhan_0-1656493777900.png

 

 

Basically I want to track Number of Leaves. ([Leaves Count] from Attendance Table) based on the project's duration. 

 

For example. The Project A starts in May and Ends in June. I want to show the Resources (Employee ID) That worked on That project and Their [Leaves Count] during the Project [Actual SD] and [Actual ED]

 

At this point it shows all days from January when I select the Project which is not the case as project starts in May. 

 

fahadkhan_1-1656494366924.png

 

It might be the case in the terms of filter direction and showing scaler values in the table form, but I can't seem to wrap my head around it. I have shared the link of zip file that contains PIBX and Data file as well, I am trying to work around the solution so far no success. 😞 a help would be great! 

 

Download PIBX File here

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

Hi @fahadkhan ,

 

In fact, the relationship you established between 'Attendance' and 'Project' is inactive, this relationship is not actually in effect, you can change the relationship to the following:

vjianbolimsft_0-1656915360465.png

 

For more detailed information, please refer to:

Model relationships in Power BI Desktop

Active vs inactive relationship guidance

 

Best Regards,

Jianbo Li

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

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @fahadkhan ,

 

In fact, the relationship you established between 'Attendance' and 'Project' is inactive, this relationship is not actually in effect, you can change the relationship to the following:

vjianbolimsft_0-1656915360465.png

 

For more detailed information, please refer to:

Model relationships in Power BI Desktop

Active vs inactive relationship guidance

 

Best Regards,

Jianbo Li

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

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.

Top Solution Authors