Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Partner
Partner

need quick help with set analysis

following expression giving error,

=sum({< STDSalary-ActualSalary = {">=0"} >}STDSalary-ActualSalary)


but following works fine,


=sum({< Diffsalary = {">=0"} >}STDSalary-ActualSalary)    

requirement is to get 1st expression working as Diffsalary is dummy column i am using for testing purpose

NameSTDSalary ActualSalaryDiffSalary
Josh20203000980
James70007500500
Ron65007100600
may50005100100
Lois27002901201
rock990100111
jaimey990878-112
Lisa900800-100
diana17671600-167
hamosh20001800-200
ali1200980-220
daisy23231200-1123
linda2000200-1800
alex1789915000-2899
Tags (1)
1 Solution

Accepted Solutions

Re: need quick help with set analysis

The first one doesn't work because you are not allowed to use calculations/functions on the left hand side of the modifier... may be you can use this

=Sum({<Name = {"=STDSalary - ActualSalary >= 0"}>} STDSalary-ActualSalary)

or this

Sum(If(STDSalary - ActualSalary >= 0, STDSalary - ActualSalary))


or this


Sum(RangeMax(STDSalary - ActualSalary, 0))

2 Replies

Re: need quick help with set analysis

The first one doesn't work because you are not allowed to use calculations/functions on the left hand side of the modifier... may be you can use this

=Sum({<Name = {"=STDSalary - ActualSalary >= 0"}>} STDSalary-ActualSalary)

or this

Sum(If(STDSalary - ActualSalary >= 0, STDSalary - ActualSalary))


or this


Sum(RangeMax(STDSalary - ActualSalary, 0))

Partner
Partner

Re: need quick help with set analysis

Thanks For the help and explanation.