Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to add the value of a field with date restriction.
I am using SET ANALYSIS, I'm not getting more.
sum({$<DATA_EMISSAO = {'01/12/2010'} >} QUANTIDADE)
To my result even better, I need to date is as follows:
> = 01.12.2010 <01.01.2011
If anyone can help?
Hi!
Two things you need to check:
- The Date format you assign to the Field Value definition in the Set Expression has to be exactly the same as the field is defined in the whole document. If it is DD/MM/YYY, don't use MM/DD/YYYY or DD.MM.YYYY.
- Try using double quotes instead of single quotes. If you are defining an interval with start and end date, the double quotes are mandatory, since it has to be defined as a Search String (double quotes = search string ; single quotes = literal value).
Hope this helps.
Mike.
How would you set this in analiysis?
I am using the following function:
sum
({$<DATA_EMISSAO = {">=(MonthStart(AddMonths(today(),(Meses))))<(MonthsEnd(1,Today(),(Meses)))" } >} QUANTIDADE)
where
MonthStart(AddMonths(today(),(Meses))) = 01/12/2010
MonthsEnd(1,Today(),(Meses)) = 31/12/2010
My problem is that she is not bringing results.
Hi,
Try this:
Sum({$<DATA_EMISSAO = {">=($(=MonthStart(AddMonths(today(),Meses))))<($(=MonthsEnd(1,Today(),Meses)))" } >} QUANTIDADE)
What type of element is "Meses"? Is it a variable? Is it a field? If it is a field, is ther only one selected/possible value? Is it part of th chart's dimensions?
Mike.
It is a variable.
I auditioned for the example that you posted more failed.
This way it works, so I can not set dates.
sum({$<DATA_EMISSAO = {">=01/12/2010<=31/12/2010" } >} QUANTIDADE)
Ok, the only thing you need is to set the format to result of the expressions inside the value definitions.
This one takes care of that:
Sum({$<DATA_EMISSAO = {">=($(=Date(MonthStart(AddMonths(today(),Meses)), 'DD/MM/YYYY')))<($(=Date(MonthsEnd(1,Today(),Meses), 'DD/MM/YYYY')))" } >} QUANTIDADE)
Mike.
This function is adding the field "QUANTIDADE" with the restrictions of the field "DATA_EMISSAO" the dates of beginning and end.