Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

If's and nested If's in Qlikview

if(Count=0 ,

IF(Capacity >1 ,

  IF([Count(Manual)]=0,SUM(Capacity),

   IF(Total-((count(if(len([EmpName])=0,

          IF([Type]='Active',

              UniqueAB2Key)))

                          +

      count(if(len([EmpName])=0,

          IF([Type]='InActive',

              UniqueKey))))) = 0

or COUNT(distinct (UniqueKey)) =0,

   sum([Capacity(Manual)]),

        COUNT(distinct (UniqueKey))))))

How do I put the above if statement together in qlikview.

Below part is working fine



IF(Total-((count(if(len([EmpName])=0,

          IF([Type]='Active',

              UniqueAB2Key)))

                          +

      count(if(len([EmpName])=0,

          IF([Type]='InActive',

              UniqueKey))))) = 0

or COUNT(distinct (UniqueKey)) =0,

   sum([Capacity(Manual)]),

        COUNT(distinct (UniqueKey))))))



but now I need to add additional logic (Bold ones are the new items added ) and that is not working.

if(Count=0 ,

IF(Capacity >1 ,

  IF([Count(Manual)]=0,SUM(Capacity),

   IF(Total-((count(if(len([EmpName])=0,

          IF([Type]='Active',

              UniqueAB2Key)))

                          +

      count(if(len([EmpName])=0,

          IF([Type]='InActive',

              UniqueKey))))) = 0

or COUNT(distinct (UniqueKey)) =0,

   sum([Capacity(Manual)]),

        COUNT(distinct (UniqueKey))))))

0 Replies