cancel
Showing results for 
Search instead for 
Did you mean: 
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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors
Top Kudoed Authors