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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

conditional filtering help

Hi all, 

I am trying to build a table of Net Working Days (or days worked) for a group of 9 team members. I am running into an interesting problem that needs a solution. You can see a snip of 3 tables below. The first column just has Names for each row which I've omitted. The dilemma I've run into is that the team has not been static over the time period (from Jan-23 - Apr-24). We had one new person join the team and one leave the team. The crux of the problem is that Net Working Days measure is defined as such:  US Days Worked = ('US Days Worked'[US Workdays Per Month] - (Count('US Days Worked'[Date]). Essentially netting PTO out from US Working Days for each team member. If you look at the PTO table in the middle you can see for Apr-24 in the first row, this is the first month this person joined our team. However in the bottom table there is no logic to account for this, so every month prior to 4/24 is tied to the first row in the first table when it should be zero. Similar issue in the second row from bottom. This person left in Jan-24, so the table on the bottom should show zero from there on ... but still shows values from the top table. 

s_schwantes_0-1717008179485.png

I'm sure there's a DAX solution or some other way to fix this ... I'm just not sure what that might be. Would really appreciate any insights or advice.

Thanks!

Steve

p.s. quick update 

I created a new table called US Start End Date Logic with binary logic. All values are set to 1 with the exception for the two rows described above. For those months where the team member had not yet joined or had left the team ... those are set to zero. So now I just need to figure out some DAX that says IF this persons value in the Start End Date table is zero, THEN zero, ELSE  US Days Worked = ('US Days Worked'[US Workdays Per Month] - (Count('US Days Worked'[Date]).

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

Based on the description, please try the following dax formula:

Working Days = 
CALCULATE(
    SUM('US Days Worked'[US Workdays Per Month]) - COUNT('US Days Worked'[Date]),
    FILTER(
        'US Start End Date Logic',
        'US Start End Date Logic'[Value] = 1
    )
)

 

Best Regards,

Wisdom Wu

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

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.