Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

multiple condition on expression

hi.

i m trying to add multiple condition on expression formula colum

like fallowing are the condition

select count(e.EMP_ID)

from ATTENDANCE_NEW.LEFT_REJOIN l,ATTENDANCE_NEW.EMP e,ATTENDANCE_NEW.DEPT d

where e.EMP_ID=l.EMP_ID

and e.DEPT_ID=d.DEPT_ID

and l.STATUS in ('Resigned' ,'Weeded Out');

and i want to put this condition like this

COUNT( {<Status={'Resigned','Weeded Out'}>} Status)

9 Replies
Anil_Babu_Samineni

Use this?

Where Match(Status,'Resigned', 'Weeded Out')

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Anonymous
Not applicable
Author

but here i need to count emp_id , and status condition are 'Resigned', 'Weeded Out'



this fallowing condition only count status , with condition 'Resigned', 'Weeded Out'


but i need to count emp_id


COUNT( {<Status={'Resigned','Weeded Out'}>} Status)


Anonymous
Not applicable
Author

count(Emp_ID) Where Match(Status,'Resigned', 'Weeded Out')


will this correct

?

tresesco
MVP
MVP

If your qv data model is properly associated (two tables are linked/joined with key field) , expression below might work:

COUNT( {<Status={'Resigned','Weeded Out'}>} emp_id)


Give a try.

Anil_Babu_Samineni

Yes, But for Aggregate functions you may need Group By clause?? Like

Load Field, Status, Count(Emp_ID) as Count_Emp_ID Where Match(Status, 'Resigned','Weeded Out') Group By Field, Status;

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Anonymous
Not applicable
Author

but its expression for measure

i dont think so i measure group by works

Anonymous
Not applicable
Author

ya qv data model is properly associated

and

seems correct but data is not correct

Anil_Babu_Samineni

In UI, you can follow Tresesco solution, But you said, The values are wrong. How we know whether values are tested one or not.

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sunny_talwar

Would you be able to share an image of your data model?