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
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors