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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.