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: 
alec1982
Specialist II
Specialist II

If condition is giving wrong values

Hi guys,

Can anybody figure out what's wrong with this If statement! it is giving value of 180 instead of 77!!

if (

   

    Sum(    if ( ((Index([Expense Type (annual)], 'Rent') = 0) or GetFieldSelections(_ShowRentFlag)=1)

                and ([Year of Expense] = $(varPlReportingYear))

              ,[Amount of Expense (USD-annual)]

            ))

         > 0

    ,

        Sum(if ( ((Index([Expense Type (annual)], 'Rent') = 0) or GetFieldSelections(_ShowRentFlag)=1)

                and ([Year of Expense] = $(varPlReportingYear))

            , [Amount of Expense (USD-annual)]

            )

        ) / 1000

    )

I appreciate any help.

Thxs,

Alec

1 Reply
Jason_Michaelides
Partner - Master II
Partner - Master II

I think you'll need to post your app to get such specific help! However, I can't see a second part of the If statement...what if the evaluation condition is not true? (I'm on a train and may have misread it...)