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.
I would like to show the demographics of employees on a Diversity, Equity & Inclusion dashboard. In my employees table, I have start/hire and end/termination dates along with the demographic info I need. Additionally, I have a date table that is connected to the employee table with an active connection from hire date and an inactive connection from termination date.
I am using the below measure to return only the employees active during the period selected in the date slicer, but I'm getting some unexpected/undesirable results. First, if the full date range is selected in the slicer, only employees that are still currently active are displayed. Second, changing the start of the range removes employees that were hired before the selected date, and changing the end date appears to remove the employees that were hired after the end date.
Employee Count =
VAR MAX_DATE = MAX ( 'Dates'[Date] )
RETURN
SUMX (
'Bamboo Employees',
IF (
'Bamboo Employees'[Hire Date] <= MAX_DATE
&& OR ( 'Bamboo Employees'[Termination Date] >= MAX_DATE , ISBLANK( 'Bamboo Employees'[Termination Date]) ),
1,
BLANK ()
)
)
Employee # | Age | Gender | Ethnicity | EEO Job Category | Employment Status | Hire Date | Termination Date | Length of Service: Years | Tenure Range | Age Range |
31036 | 24 | Male | White | Administrative Support Workers | Full-Time | 07/26/2021 | 0 | <1 Year | <30 | |
12440 | 38 | Male | White | Craft Workers | Full-Time | 07/15/2021 | 0 | <1 Year | 30-40 | |
12439 | 37 | Male | White | Craft Workers | Full-Time | 07/08/2021 | 0 | <1 Year | 30-40 | |
12438 | 63 | Female | White | Laborers and Helpers | Full-Time | 07/08/2021 | 0 | <1 Year | 60+ | |
12437 | 60 | Male | White | Laborers and Helpers | Full-Time | 07/08/2021 | 0 | <1 Year | 60+ | |
12436 | 24 | Female | White | Laborers and Helpers | Full-Time | 07/06/2021 | 0 | <1 Year | <30 | |
12434 | 25 | Male | White | Craft Workers | Full-Time | 07/06/2021 | 0 | <1 Year | <30 | |
12430 | 61 | Male | White | Craft Workers | Full-Time | 06/14/2021 | 0 | <1 Year | 60+ | |
12426 | 37 | Male | White | Craft Workers | Full-Time | 06/02/2021 | 0 | <1 Year | 30-40 | |
31006 | 23 | Male | White | Administrative Support Workers | Full-Time | 06/01/2021 | 0 | <1 Year | <30 | |
31053 | 50 | Male | White | Professionals | Full-Time | 05/20/2021 | 0 | <1 Year | 50-60 | |
31062 | 27 | Male | White | Laborers and Helpers | Full-Time | 05/18/2021 | 0 | <1 Year | <30 | |
2386 | 55 | Male | White | Craft Workers | Full-Time | 05/17/2021 | 0 | <1 Year | 50-60 | |
31061 | 28 | Male | White | Laborers and Helpers | Full-Time | 05/17/2021 | 0 | <1 Year | <30 | |
31060 | 52 | Male | White | First/Mid Level Officials and Managers | Full-Time | 05/12/2021 | 0 | <1 Year | 50-60 |
Any help in creating the appropriate measure is greatly appreciated. Until this point, I've never had to use any measures outside of quick measures. Thanks!
Solved! Go to Solution.
@Anonymous
Take a look at these two Quick Measures as I think you want something like them.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364
https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365
@Anonymous
Take a look at these two Quick Measures as I think you want something like them.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364
https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365
Thank you! I know I tried these before, but I must have done something wrong the first time. The first one worked perfectly for my application.
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 |
---|---|
97 | |
97 | |
82 | |
75 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |