cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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 November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors