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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
MarceloPavas_27
New Member

List of Employees not in a range of dates

Hi everyone,

I have a list os Employees and Dates and I need to list all employees that are not in a certain period. For example:
We have the [Employee] column and the [Year] column
And we have a filter equal to 2022
So, I need some way to show a list of all employees that has no 2022 value on the data table.

But if I change the Year on the filter pane to 2021 the list needs to comply with the filter.

Can anyone please help me?

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

One of ways to achieve this is to have disconnected Year_table, so once a year is selected from a slicer, the table visualization can show year numbers that is not equal to the year number from the slicer.

 

Picture1.png

 

Year measure: =
VAR maxyearslicer =
MAX ( 'Year'[Year] )
VAR slicerselect =
SELECTEDVALUE ( 'Year'[Year], maxyearslicer )
RETURN
IF (
HASONEVALUE ( Employee[Employee] ),
CALCULATE ( MAX ( Employee[Year] ), Employee[Year] <> slicerselect )
)


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

One of ways to achieve this is to have disconnected Year_table, so once a year is selected from a slicer, the table visualization can show year numbers that is not equal to the year number from the slicer.

 

Picture1.png

 

Year measure: =
VAR maxyearslicer =
MAX ( 'Year'[Year] )
VAR slicerselect =
SELECTEDVALUE ( 'Year'[Year], maxyearslicer )
RETURN
IF (
HASONEVALUE ( Employee[Employee] ),
CALCULATE ( MAX ( Employee[Year] ), Employee[Year] <> slicerselect )
)


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thanks @Jihwan_Kim this helps me a lot to find a way to work around my problem.

Best regards!

amitchandak
Super User
Super User

@MarceloPavas_27 , Assume you have count of employee measures

 

_cnt = count(Table[Employee])

or

_cnt =
var _max = maxx(allselected(Date), Date[Year])
return
calculate(count(Table[Employee]), filter(Table, Table[Year] = _max))

 

 

Then create a measure to find who is not there in selected range, prefer Employee dimension 

Measure =
countx(values(Employee[Employee]), if(isblank([_Cnt]), [Employee], blank()))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.