Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hola tengo un problema con un drop
genere las fechas con un calendario maestro, la cuestion es que me esta ordenando por dias, y yo quiero que me los orden por año y mes, para que todo lo de un mismo año salga junto, es posible, estoy usando el siguiente codigo
calendario:
LET vDateMin = Num(MakeDate(2020,1,1));
LET vDateMax = Floor(Today());
TempCalendar:
LOAD $(vDateMin) + RowNo() - 1 as DateNumber,
Date($(vDateMin) + RowNo() - 1) as TempDate
AUTOGENERATE 1
WHILE $(vDateMin) + IterNo() - 1<= $(vDateMax);
Calendario:
LOAD
Year(TempDate) as Año,
Month(TempDate) as Mes,
Year(TempDate)&num(Month(TempDate),'00') as AñoMes,
Dual(Month(TempDate)&'-'&Right(Year(TempDate),2),
Year(TempDate)&num(Month(TempDate),'00')) AS [Mes-Año],
Day(TempDate) as Dia,
Num(TempDate) as NumMes,
date(TempDate) as Fecha,
date(MonthEnd(TempDate)) as FechaInicio
Resident TempCalendar
Order By TempDate Asc;
Ciclo:
Load
max(Dia) as nomes,
FechaInicio as dateSelect
Resident Calendario
Group by FechaInicio
Order by AñoMes,Dia asc;
De ante mano, gracias comunidad, saludos.
try below
=concat(distinct dateSelect,'|',dateSelect)
which field is this screenshot for?
the field fecha will sort correctly
what is the purpose of the field dateSelect?
lo usamos para poder hacer un filtro con esta expresion
=If(len(if(Aggr(date([Fecha Doc.],'DD/MM/YYYY'), key) <= date('$(vFechaInput)', 'DD/MM/YYYY')
AND Sociedad = '$(vSociedad)'
AND If(Mid([Cta.Mayor],5,3) = '190', [Cta.Mayor] = Replace('$(vCuentaMayor)',100,190),
if(Mid([Cta.Mayor],5,3) = '180',[Cta.Mayor] = Replace('$(vCuentaMayor)',100,180),[Cta.Mayor]))
AND FechaComp > num(date('$(vFechaInput)', 'DD/MM/YYYY')), key), )>0, ConceptoClase2)
el valor del drop que usamos es este
Concat(distinct dateSelect, '|')
try below
=concat(distinct dateSelect,'|',dateSelect)
thanks!! it work!! 😊