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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
BCFi
Contributor II
Contributor II

DataEditor Count and then Filter in counted Variable

Hi There,

 

I am trying to do an anlysis and prepare the data in the data editor.

My problem simplified:

There are several tasks and I am counting the tasks for each department. Now there several Sub Tasks for this department. For example all departments need to following steps:

identify requirement

satisfy requirements

document solutions

 

Now I want to count the total tasks of Department X. So I will do:

count ( if ( @Department = 'X')) as Tasks_X

The next step would be to unroll the tasks for each departmend. So i  am doing the following right now: 

count if (@Department = 'X' and @Task = 'identify requirements') as Tasks_X_identify.

My real world example is a bit more complex because i have to apply much more filters.

 

The question now is. As I already filtered for Tasks_X. Can i do something like:

IF Tasks_X=TRUE()  AND @TASK = 'identify requirements' as Tasks_X_identify.

 

I hope it is somehow understandable...

 

Thanks a lot !

Labels (2)
1 Solution

Accepted Solutions
Mark_Little
Luminary
Luminary

You would need to do an additional load and either keep it separate or join it back

LOAD 

Department,

Count(Task) as TaskCount

IF( Task = 'identify requirements',Count(Distinct Task)) as "identify requirements count"

...

Resident Table

Group by Department;

View solution in original post

1 Reply
Mark_Little
Luminary
Luminary

You would need to do an additional load and either keep it separate or join it back

LOAD 

Department,

Count(Task) as TaskCount

IF( Task = 'identify requirements',Count(Distinct Task)) as "identify requirements count"

...

Resident Table

Group by Department;