Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
D19PAL
Creator II
Creator II

Count 1 and more than one

Hi.

How do I do this

Id,job,manager,accepted 

1,10,john,yes

2,10,john,yes

3,23,paul,yes

4,45,Jane,yes

Create two expressions or columns in script to

Count where theres accepted yes by Job  by job

 

And 

 

Where theres two jobs accepted like job 10, all other jobs are 1.

 

Thanks

 

1 Solution

Accepted Solutions
MEDHA07
Contributor III
Contributor III

Use
If (job=previous(job) and manager=previous(manager),1,2) as count_Flag;
Use count_Flag= 1 in measure
10=10 and john=john is matching means it will consider as true.

View solution in original post

4 Replies
MEDHA07
Contributor III
Contributor III

Hi,

can you tell how you are expecting output based on your table,unable to understand your query.

D19PAL
Creator II
Creator II
Author

If columns job,manager are the same and accepted column is populated then count if more than 1.

So I want 1d,1 and 2 be grouped by job and count as 1 because its multiple.

 

Id 3 and 4 count as 1 because theres just one line.

Outcome

Id,job,manager,accepted,multiple,single

1,10,john,yes,1,

2,10,john,yes,,

3,23,paul,yes,,1

4,45,Jane,yes,,1

 

Thanks

 

 

MEDHA07
Contributor III
Contributor III

Use
If (job=previous(job) and manager=previous(manager),1,2) as count_Flag;
Use count_Flag= 1 in measure
10=10 and john=john is matching means it will consider as true.
D19PAL
Creator II
Creator II
Author

Thanks a lot