Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

set analysis - difference between -= and =- operations

Hi All,

Please someone clarify me that the difference between the operators -= and =-.

Below is the inline load

LOAD * INLINE [

    name, salary

    srinivas, 1

    sriram, 2

    srilatha, 3

    srinath, 4

    srinidhi, 5

    santhosh, 6

    madhu, 7

    gopi, 8

    aruna, 9

    dhanapriya, 10

];

Created the text box in the sheet and given the below query.

=sum({<name-={"sri*"}>}salary)--------returned "40" as the result

if i use "=sum({<name=-{"sri*"}>}salary)", returning the same result.

At what situations, these both will show the difference?

1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: set analysis - difference between -= and =- operations

=SUM({<name =- {'*sri*'}>}salary) and =SUM({<name -= {'*sri*'}>}salary)

will give you same result without selecting anything.

But if you select something... say srinidhi, santhosh, madhu

=SUM({<name =- {'*sri*'}>}salary) will still give you 40 but

=SUM({<name -= {'*sri*'}>}salary) will give you 13 as this expression is working wrt current selection.


So, in short, if you want SUM(Salary) excluding sri with respect to current selection use 2nd expression but if you want SUM(Salary) excluding sri but should not change based on selection in name, use 1st expression.


Hope this would make clear..

View solution in original post

4 Replies
Highlighted
MVP
MVP

Re: set analysis - difference between -= and =- operations

=SUM({<name =- {'*sri*'}>}salary) and =SUM({<name -= {'*sri*'}>}salary)

will give you same result without selecting anything.

But if you select something... say srinidhi, santhosh, madhu

=SUM({<name =- {'*sri*'}>}salary) will still give you 40 but

=SUM({<name -= {'*sri*'}>}salary) will give you 13 as this expression is working wrt current selection.


So, in short, if you want SUM(Salary) excluding sri with respect to current selection use 2nd expression but if you want SUM(Salary) excluding sri but should not change based on selection in name, use 1st expression.


Hope this would make clear..

View solution in original post

Highlighted
Creator
Creator

Re: set analysis - difference between -= and =- operations

Thanks manish.It makes me clear now.

Highlighted

Re: set analysis - difference between -= and =- operations

If you got what you were looking for, I suggest marking Manish's answer as corrrect and close the thread.

Best,

Sunny

Highlighted
MVP
MVP

Re: set analysis - difference between -= and =- operations

Can you close the thread by selecting correct answer?