Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
apthansh
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