Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I'm not able to bring the sum of days in a given period.
Does anyone have a solution?
Here the result is 81 working days.
01/2011 = 21
02/2011 = 20
03/2011 = 21
04/2011 = 19
Is attached hereto.
Hi washington,
the right formula is the following one:
aggr(DISTINCT avg(Weekdays),months)
You can use the max or min function as well.
..you have to change the Total Mode modifications to the following ones:
Hi,
Washington. Not sure about what your problem really is.
Do you want to automatically calculate network days and sum it?
The first problem is the date in your file. It was not recognized as a date, since it was not written in your own date format ( check the sets in the beginning of the script :SET DateFormat='DD/MM/YYYY';)
You can adjust it at the script (recommended) or at the interface. The syntax will be like this:
date#(months,'MMM/YY') or you can write the date in your own format.
After this, you can use network days to get the number you need:
NetWorkDays(MonthStart(months), Monthend(months))
I used monthstart and monthend to get the first and last date of months (if it is already a real date)
To make it work on a chart with the date as string (as it is now) you can use:
NetWorkDays(MonthStart(date#(months,'MMM/YY')), Monthend(date#(months,'MMM/YY'))) )
or even:
SUM( NetWorkDays(MonthStart(date#(months,'MMM/YY')), Monthend(date#(months,'MMM/YY'))) )
Hope it helps,
Erich
Eric,
Já tenho os dias calculados.
Obrigado.
Yasus,
Como utilizar essa expressão em um objeto texto?
Em um objeto de texto pode usar:
= sum( aggr(DISTINCT avg(Weekdays),months) )
O aggr faz o cálculo e retorna o valor para cada um dos valores da dimensão agregadora (neste caso um valor para cada possível valor de months)
Erich,
Parece que agora deu certo.
Obrigado.