Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I want to compare the week and year of end field(which has dates in it) with todays week and year within set analysis based on which i need to perform count of emp_id,and thus used the expression
=count({$<year(End)={(=(year(today()))},week(End)={(=week(today()))}>}Emp_Id)
But,this is not giving me desired results.Can any one help me with the same
HI
Try like this
In script , bring Year and Week field name for END..
Then Try like this
=count({$<Year={$(=year(today()))},Week={$(=week(today()))}>}Emp_Id)
Hope it helps
I would want to implement this on front end and not in scripting
Try something like
=count( {$<End={">=$(=Date(weekstart(today())))<=$(=Date(weekend(today())))"} >} Emp_Id)
Add appropriate format codes for Date() function if needed.
Hi,
Looking at your answer and seeing the use of Double Quotes in the expression prompts me to ask you directly the same question I just posted under the title SET ANALYSIS. Many thanks if you can answer:
In an example of set analysis which I have downloaded, an expression was written as such:
=if(sum({$<YR = {$(=max(YR - 1))}, MO = {"<=$(=max({<YR={$(=max(YR))}>} MO))"}>} TranAmt)
> sum({$<YR = {$(=max(YR))}, MO = {"<=$(=max({<YR={$(=max(YR))}>} MO))"}>} TranAmt),
sum({$<YR = {$(=max(YR))}, MO = {"<=$(=max({<YR={$(=max(YR))}>} MO))"}>} TranAmt),
sum({$<YR = {$(=max(YR) - 1)}, MO = {"<=$(=max({<YR={$(=max(YR))}>} MO))"}>} TranAmt)
)
Although it is a bit convoluted I can descern that Month = {"<=$(=max({<Year={$(=max(Year))}>} Month))"}>} is to find the Month which is "less than or equal Max Month of the Max Year".
My question though is regarding the double quote: When / where / why use double quotes vs single quotes if use any of them at all? And is there any written material regarding advanced construct and punctuation of expressions within set analysis?
Thanks
Hi,
use double qoutes for a search expression (like you can use in listbox search or search object) and single qoutes for a literal string value or $-expansion.
- Ralf
Thanks Ralf