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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Syntax using 2 Ifs.

Dear Qlikview community,

As mentioned in my previous post, i'm new in qlikview and I need your help to achieve below calculation

Here is the formula using excel

=COUNTIFS(B13:B20,"A",C13:C20,"")

Count nationality if it's A and the final process is null

Here is the sample data

                                        

NationalityFinal Process
a
a
A
b
3

I appreciate your help

31 Replies
PrashantSangle

Hi,

try like,

count(if(len(trim([Final Process]))=0 and wildmatch(Nationality,'a'),Nationality))

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sasikanth
Master
Master

HI,

Please find the Attachment

Req1) :=count({<Nationality={'American'}>} if(len(Final_Process)=0,Nationality))

Req 2) =count({<Nationality={'American'},Person_Types={'Trainee'}>} if(len(Final_Process)=0,Nationality))

MayilVahanan

HI

PFA

Req 1: =Count({<Nationality = {'American'}, [Final Process] ={"=LEN(Trim([Final Process]))=0"}>}Nationality)


Req 2: =Count({<Nationality = {'American'}, [Final Process] ={"=LEN(Trim([Final Process]))=0"}, [Person Types] ={'Trainee'}>}Nationality)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Kushal_Chawda

Data:

LOAD *, if(lower(trim(Nationality))='american' and len(trim([Final Process]))<=0,EmpName) as AmericanEmp,

if(lower(trim(Nationality))='american' and len(trim([Final Process]))<=0 and lower(trim([Person Types]))='trainee',EmpName) as AmericanEmpTrainee

Inline [

BGID, Business Group, EmpName, Nationality, Div, Person Types, Final Process

85, Corp, Emp 1, American, 30, Trainee,

85, Corp, Emp 2, American, 30, REGULAR ,

85, Corp, Emp 3, American, 30, REGULAR, 31-DEC-05

85, Corp, Emp 4, Canadian, 30, REGULAR, 31-MAR-05

52, Corp, Emp 5, Sudanese, 52, REGULAR,

85, Corp, Emp 6, Sudanese, 30, REGULAR,

85, Corp, Emp 7, British, 30, REGULAR,

85, Corp, Emp 8, British, 30, REGULAR,

85, Corp, Emp 9, Egyptian, 30, REGULAR ];



Capture.JPG

Not applicable
Author

Hello everyone.

Many thanks for all your suggestions.

I have tried all but the load (from Mayil) and still is not working.  I'm just wondering if this is a limitation by personal edition or the attributes of the source file.


sasikanth
Master
Master

HI,

Upload your qvw,

Not applicable
Author

Hi Sunny, how to upload file to our conversation

sasikanth
Master
Master

hi,

right side of the window there is one option "Use Advanced Editor "

use that one and attache your file

rajeshforqlikvi
Creator
Creator

Hi Are you looking like this ..?

=Count(If(Nationality='A',Nationality))

Regards

Rajesh Kumar

Not applicable
Author

Thanks Rajesh,

There are two dimensions:

Count if

(field) Nationality is "A" and

(field) Final Date is null

Qlikview should count if these two arguments are met, if not, Qlikview should not count.

Regards,