Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
20 | |
15 | |
13 |
User | Count |
---|---|
51 | |
46 | |
39 | |
19 | |
19 |