Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to make a table which sums the number of employees in each department. The data is loaded from an Excel spreadsheet with the following relevant columns:
| Department | EmployeeID |
| Bygg | 478 |
| Bygg | 286 |
| Grunnarbeid | 500 |
| Grunnarbeid | 280 |
| Bygg | 337 |
| Bygg | 341 |
| Økonomi, personal og IKT | 430 |
| Maskin og lager | 358 |
| ingen | 999 |
| Bygg | 240 |
| Økonomi, personal og IKT | 123 |
| Grunnarbeid | 408 |
| Grunnarbeid | 484 |
| Anlegg og VA | 426 |
| Bygg | 359 |
| Park og miljø | 378 |
| Oppmåling | 416 |
| Mekanisk | 428 |
| Grunnarbeid | 471 |
| Grunnarbeid | 468 |
| Bygg | 440 |
| Bygg | 438 |
| Bygg | 476 |
| Anlegg og VA | 356 |
| Park og miljø | 182 |
How can I do this?
Thanks!
Hello robertfoss,
you have to use the count & distinct: count(DISTINCT EmployeeID).
gr
Hello,
You can use a striaght table or a bar chart for this.
Add Department as dimension and use expression as count(EmployeeID).
Please refer the attached sample.
Hope it helps.
Regards,
-Khaled.
Thanks,
However, I forgot to mention one important detail.
The EmployeeID can contain multiple duplicate values, so what I really need is to Count the number of unique values, not the total number of values.
Hello robertfoss,
you have to use the count & distinct: count(DISTINCT EmployeeID).
gr
Just add the distinct keyword in the expression. ...so it would be
something like count ( distinct EmployeeID)....
Hope it helps.
Regards,
-Khaled.