Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
=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..
=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..
Thanks manish.It makes me clear now.
If you got what you were looking for, I suggest marking Manish's answer as corrrect and close the thread.
Best,
Sunny
Can you close the thread by selecting correct answer?