Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
I have this table with employees.
It has a relation with Calendar table.
My task is to create a measure that shows new hires first occurances on the date axis (edit: I want to show first occurance of the employee).
Now it's just a simple DAX: Hires = DISTINCTCOUNT('Employee'[Name]).
So we have such a table in PBI.
How to write this DAX so that:
- there is only one occurence ( 01/01/2019) when no filter is applied;
- when there's a filter Level=Mid there's a new hire an occurence only on 01/01/2019 and when there's a filter Level=Senior there's a new hire one only on 01/01/2021;
- when there's a filter Team=Bob there's a new hire only one occurence on 01/08/2021 ?
I'm stuck. Please, help.
Nobody? 😞
There is one employee - John Doe. We have his history in the table.
He started as a Mid in Anna's Team, then got promoted to Senior and later changed his team.
@AnetaK - you use case doesn't make sense then. The data does not support what you're asking, as there are 3 employees (with no filter), 2 Senior (with a filter on senior), 2 on Team Bob (with a filter on team).
Perhaps you can restate your use case / requirements?
David
It's the same on the line chart. It's just easier here to show it on the table.
Using COUNTROWS(Employee) instead of DISTINCTCOUNT makes no change.
Hi @AnetaK -
Don't create the table like you did. Just use the Start Date (or the Calendar date) as the X-axis, value is COUNTROWS(Employee). Your filter will redraw the chart when you use them.
Hope this helps
David