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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
Referencing my previous question here - Solved: Re: Understanding Headcount (Dax for Allexcept, Al... - Microsoft Fabric Community
Let us assume that I came in to work on 1/15, 1/26, 1/30, 2/16 and 2/27.
I have to find 2 things
1. Total Attendance: Which is how many individuals come to the office. Based on the dates of attendance, my total attendance if I filter/slice for January, should be 3 and that for February should be 2
2. Head Count: Which is unique appearance per time period. So if I filtered for January, my attendance is 1, and the same goes for February.
I have 2 measures to solve for the same -
| Employee Full Name | EmployeeID | EnterBadgeDate |
| M | 1 | 1/3/2024 |
| M | 1 | 1/17/2024 |
| M | 1 | 1/24/2024 |
| M | 1 | 1/31/2024 |
| E | 2 | 2/6/2024 |
| M | 1 | 2/6/2024 |
| D | 3 | 2/7/2024 |
| E | 2 | 2/7/2024 |
| M | 1 | 2/7/2024 |
| D | 3 | 2/8/2024 |
| E | 2 | 2/8/2024 |
| M | 1 | 2/8/2024 |
| E | 2 | 2/23/2024 |
| M | 1 | 2/23/2024 |
| E | 2 | 2/27/2024 |
| M | 1 | 3/6/2024 |
| E | 2 | 3/12/2024 |
| M | 1 | 3/14/2024 |
| M | 1 | 3/20/2024 |
| E | 2 | 4/1/2024 |
| E | 2 | 4/2/2024 |
| M | 1 | 4/11/2024 |
| M | 1 | 4/16/2024 |
| M | 1 | 4/17/2024 |
| M | 1 | 4/24/2024 |
| M | 1 | 5/2/2024 |
| E | 2 | 5/7/2024 |
| M | 1 | 5/7/2024 |
| E | 2 | 5/22/2024 |
| M | 1 | 5/23/2024 |
| E | 2 | 5/28/2024 |
| E | 2 | 5/30/2024 |
| D | 3 | 6/4/2024 |
| M | 1 | 6/4/2024 |
| E | 2 | 6/11/2024 |
| E | 2 | 6/12/2024 |
| M | 1 | 6/12/2024 |
| E | 2 | 6/19/2024 |
| M | 1 | 6/19/2024 |
| E | 2 | 6/26/2024 |
| M | 1 | 7/16/2024 |
| E | 2 | 7/16/2024 |
| M | 1 | 7/17/2024 |
| D | 3 | 7/17/2024 |
| E | 2 | 7/17/2024 |
| M | 1 | 7/24/2024 |
| E | 2 | 7/24/2024 |
| D | 3 | 8/6/2024 |
| M | 1 | 8/6/2024 |
| E | 2 | 8/6/2024 |
| D | 3 | 8/7/2024 |
| M | 1 | 8/7/2024 |
| E | 2 | 8/7/2024 |
| D | 3 | 8/8/2024 |
| E | 2 | 8/8/2024 |
| M | 1 | 8/8/2024 |
| M | 1 | 8/12/2024 |
| E | 2 | 8/12/2024 |
| M | 1 | 8/21/2024 |
| E | 2 | 8/26/2024 |
| M | 1 | 8/27/2024 |
| M | 1 | 8/28/2024 |
| E | 2 | 8/29/2024 |
| M | 1 | 9/4/2024 |
| M | 1 | 9/12/2024 |
| M | 1 | 9/18/2024 |
| E | 2 | 9/18/2024 |
I think you can just get rid of the ALLSELECTED in your CALCULATE. Alternatively try modifying your measure as follows:
Unique BadgeIns = CALCULATE(DISTINCTCOUNT('Badging Data'[EmployeeID]), ALLSELECTED('Badging Data'),Table[Division Name] = SELECTEDVALUE(Table[Division Name])
where Table is the name of the table that contains the Division Name used in the treemap.
Hope this helps!
Proud to be a Super User! | |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 73 | |
| 66 | |
| 65 |