Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
alespooletto
Creator II
Creator II

Count measure not counting correctly when filtering

I have an issue with my measure, which supposedly only counts specific action codes. 

The measure is 

```

COUNT( ACTION_CODE = 'LABOR_OFF')

```

But when I insert it into the table, I don't get the right counts and shows as in the screenshot that it counts also when ACTION_CODE = 'LABOR_ON' 

 

alespooletto_0-1709212970647.png

 

Is there any solution to this?

Labels (1)
2 Solutions

Accepted Solutions
theoat
Partner - Specialist
Partner - Specialist

Try this : 
Count({<ACTION_CODE={"LABOR_OFF"}>}distinct Employee)

Enjoy your Qlik.

Kind regards,
Théo ATRAGIE.

View solution in original post

Clement15
Partner - Specialist
Partner - Specialist

Hello, could this be suitable?

count({<ACTION_CODE = {'LABOR_OFF'}>} ACTION_CODE )

View solution in original post

3 Replies
theoat
Partner - Specialist
Partner - Specialist

Try this : 
Count({<ACTION_CODE={"LABOR_OFF"}>}distinct Employee)

Enjoy your Qlik.

Kind regards,
Théo ATRAGIE.

Clement15
Partner - Specialist
Partner - Specialist

Hello, could this be suitable?

count({<ACTION_CODE = {'LABOR_OFF'}>} ACTION_CODE )

alespooletto
Creator II
Creator II
Author

Thank you, this gives me a 1 as result, which would work fine if I needed to check what an employee did on a specific SFC without counting all the SFCs at once. I needed one that would count, for all the SFCs done, the number of which had action code = labor off. The response by @Clement15 actually provided the solution, thank you all!