This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello - needing help formulating a measure to help count for visual.
Goal -
Sample data:
| Date | Employee ID | User Name | User First Name | User Last Name | User Email |
| 4/1/2023 | 123456789 | Clark Griswold | Clark | Griswold | clarkgriswold@christmasvacation.com |
| 4/1/2023 | 123456789 | Clark Griswold | Clark | Griswold | clarkgriswold@christmasvacation.com |
| 4/1/2023 | 123456789 | Clark Griswold | Clark | Griswold | clarkgriswold@christmasvacation.com |
| 4/1/2023 | 123456789 | Clark Griswold | Clark | Griswold | clarkgriswold@christmasvacation.com |
| 4/1/2023 | 123456789 | Clark Griswold | Clark | Griswold | clarkgriswold@christmasvacation.com |
| 5/1/2023 | 123456789 | Clark Griswold | Clark | Griswold | clarkgriswold@christmasvacation.com |
| 5/1/2023 | 987654321 | Uncle Eddy | Uncle Eddy | Johnson | uncleeddy@christmasvacation.com |
| 5/1/2023 | 987654321 | Uncle Eddy | Uncle Eddy | Johnson | uncleeddy@christmasvacation.com |
| 4/1/2023 | 563214897 | Ellen Griswold | Ellen | Griswold | ellengriswold@christmasvacation.com |
| 4/1/2023 | 563214897 | Ellen Griswold | Ellen | Griswold | ellengriswold@christmasvacation.com |
| 4/1/2023 | 563214897 | Ellen Griswold | Ellen | Griswold | ellengriswold@christmasvacation.com |
| 4/1/2023 | 563214897 | Ellen Griswold | Ellen | Griswold | ellengriswold@christmasvacation.com |
| 4/1/2023 | 563214897 | Ellen Griswold | Ellen | Griswold | ellengriswold@christmasvacation.com |
| 4/1/2023 | 563214897 | Ellen Griswold | Ellen | Griswold | ellengriswold@christmasvacation.com |
| 5/1/2023 | 563214897 | Ellen Griswold | Ellen | Griswold | ellengriswold@christmasvacation.com |
| 5/1/2023 | 563214897 | Ellen Griswold | Ellen | Griswold | ellengriswold@christmasvacation.com |
| 5/1/2023 | 563214897 | Ellen Griswold | Ellen | Griswold | ellengriswold@christmasvacation.com |
| 6/1/2023 | 789456132 | Rusty Griswold | Rusty | Griswold | rustygriswold@christmasvacation.com |
| 6/1/2023 | 789456132 | Rusty Griswold | Rusty | Griswold | rustygriswold@christmasvacation.com |
| 6/1/2023 | 789456132 | Rusty Griswold | Rusty | Griswold | rustygriswold@christmasvacation.com |
| 6/1/2023 | 789456132 | Rusty Griswold | Rusty | Griswold | rustygriswold@christmasvacation.com |
| 6/1/2023 | 789456132 | Rusty Griswold | Rusty | Griswold | rustygriswold@christmasvacation.com |
| 6/1/2023 | 789456132 | Rusty Griswold | Rusty | Griswold | rustygriswold@christmasvacation.com |
| 6/1/2023 | 789456132 | Rusty Griswold | Rusty | Griswold | rustygriswold@christmasvacation.com |
| 6/1/2023 | 789456132 | Rusty Griswold | Rusty | Griswold | rustygriswold@christmasvacation.com |
| 4/1/2023 | 789456132 | Rusty Griswold | Rusty | Griswold | rustygriswold@christmasvacation.com |
| 4/1/2023 | 789456132 | Rusty Griswold | Rusty | Griswold | rustygriswold@christmasvacation.com |
| 4/1/2023 | 789456132 | Rusty Griswold | Rusty | Griswold | rustygriswold@christmasvacation.com |
| 6/1/2023 | 123456789 | Clark Griswold | Clark | Griswold | clarkgriswold@christmasvacation.com |
| 6/1/2023 | 123456789 | Clark Griswold | Clark | Griswold | clarkgriswold@christmasvacation.com |
| 6/1/2023 | 123456789 | Clark Griswold | Clark | Griswold | clarkgriswold@christmasvacation.com |
| 6/1/2023 | 123456789 | Clark Griswold | Clark | Griswold | clarkgriswold@christmasvacation.com |
| 6/1/2023 | 123456789 | Clark Griswold | Clark | Griswold | clarkgriswold@christmasvacation.com |
| 6/1/2023 | 123456789 | Clark Griswold | Clark | Griswold | clarkgriswold@christmasvacation.com |
| 4/1/2023 | 654789213 | Audry Griswold | Audry | Griswold | audrygriswold@christmasvacation.com |
ATTEMPT 1 ---
Adjustments made in power query: Group by 'Employee ID'
I set up two measurements:
However, I am not able to filter by date with slicer because I grouped the information in power query and my date is not longer an option in the data.
ATTEMPT 2 ---
Adjustments made in power query: Group by 'Employee ID', and 'Date'
Visuals updated...no longer accurate. I only have 5 employees in my data.
ATTEMPT 3 ---
This is where I am stuck. It seems like attempt 3 will provide me the option to slice by date but I am lost on how to create the measurements. When I follow the same measurements above, adjusting for column names, I receive errors.
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
I tried to create a datamodel like below.
I hope the below can provide some ideas on how to create a solution for your datamodel.
Count employee with 1 or more login: =
VAR _t =
ADDCOLUMNS (
VALUES ( Employee[Employee ID] ),
"@logincount", CALCULATE ( COUNTROWS ( Data ) )
)
RETURN
COUNTROWS ( FILTER ( _t, [@logincount] >= 1 ) )
Percentage employee with 3 or more login: =
VAR _employeecount =
COUNTROWS ( VALUES ( Employee[Employee ID] ) )
VAR _t =
ADDCOLUMNS (
VALUES ( Employee[Employee ID] ),
"@logincount", CALCULATE ( COUNTROWS ( Data ) )
)
VAR _threeormore =
COUNTROWS ( FILTER ( _t, [@logincount] >= 3 ) )
RETURN
DIVIDE ( _threeormore, _employeecount )
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
I tried to create a datamodel like below.
I hope the below can provide some ideas on how to create a solution for your datamodel.
Count employee with 1 or more login: =
VAR _t =
ADDCOLUMNS (
VALUES ( Employee[Employee ID] ),
"@logincount", CALCULATE ( COUNTROWS ( Data ) )
)
RETURN
COUNTROWS ( FILTER ( _t, [@logincount] >= 1 ) )
Percentage employee with 3 or more login: =
VAR _employeecount =
COUNTROWS ( VALUES ( Employee[Employee ID] ) )
VAR _t =
ADDCOLUMNS (
VALUES ( Employee[Employee ID] ),
"@logincount", CALCULATE ( COUNTROWS ( Data ) )
)
VAR _threeormore =
COUNTROWS ( FILTER ( _t, [@logincount] >= 3 ) )
RETURN
DIVIDE ( _threeormore, _employeecount )
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 6 | |
| 6 |