Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi everyone,
I am fairly new to Power BI so apologies if this isn't particularly difficult, any help that can be given would be much appreciated.
I am working on a report that has a date slicer (using a date table) that should display all employees who have started or left the company within the selected dates. Also any employees that haven't started or left within those dates should be "neither"
I currently have a Calendar Table and Worker table that has Calendar Date, EmployeeEndDate, EmployeeStartDate, Worker ID.
I tried creating a calculated column that would display Starter, Leaver and Neither for each calendar date of each worker but it was only showing startes/leavers within a few months
Any help would be really appreciated please, thank you
Solved! Go to Solution.
Hi @Anonymous ,
Inactive the relationship between calendar table and employee table if have relationship.
Create a measure like the following:
Measure =
IF (
OR (
SELECTEDVALUE ( 'Table'[EmployeeStartDate] ) >= MIN ( 'calendar'[Date] )
&& SELECTEDVALUE ( 'Table'[EmployeeStartDate] ) <= MAX ( 'calendar'[Date] ),
SELECTEDVALUE ( 'Table'[EmployeeEndDate] ) >= MIN ( 'calendar'[Date] )
&& SELECTEDVALUE ( 'Table'[EmployeeEndDate] ) <= MAX ( 'calendar'[Date] )
),
1
)
Put this measure in filter pane of the table visual which you want to display the employee during the date.
And the output:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Inactive the relationship between calendar table and employee table if have relationship.
Create a measure like the following:
Measure =
IF (
OR (
SELECTEDVALUE ( 'Table'[EmployeeStartDate] ) >= MIN ( 'calendar'[Date] )
&& SELECTEDVALUE ( 'Table'[EmployeeStartDate] ) <= MAX ( 'calendar'[Date] ),
SELECTEDVALUE ( 'Table'[EmployeeEndDate] ) >= MIN ( 'calendar'[Date] )
&& SELECTEDVALUE ( 'Table'[EmployeeEndDate] ) <= MAX ( 'calendar'[Date] )
),
1
)
Put this measure in filter pane of the table visual which you want to display the employee during the date.
And the output:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you very much for your response, I will try this and update if this is solution as soon possible!
@Anonymous , refer if my blog or attached file can help
Thank you very much for your response, I will try this and update if this is solution as soon possible!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
81 | |
52 | |
39 | |
35 |
User | Count |
---|---|
95 | |
79 | |
52 | |
49 | |
47 |