Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Please help me!!!!.
I need to calculate the max value of date by dimension: Cod_Contratante. Example:
Cod_Contratante Date
1 1/2/2017
1 2/2/2017
2 4/2/2016
2 3/3/2017
And I need this result:
Cod_Contratante Date Max(Date)
1 1/2/2017 2/2/2017
1 2/2/2017 2/2/2017
2 4/2/2016 3/3/2017
2 3/3/2017 3/3/3017
I want to calculate tha max of date by Cod_Contratante.
max(total <Cod_Contratante> Date)
Try with this:
=Date(Max(Date),'DD/MM/YYYY')
Script:
DATA:
LOAD * Inline [
Cod_Contratante, Date
1,1/2/2017
1,2/2/2017
2,4/2/2016
2,3/3/2017
];
MAX:
LOAD Cod_Contratante, max(Date) as MaxDate resident DATA group by Cod_Contratante;
Result:
thanks for your help, but If I select a date, MaxDate no change. And I need to change the date according to the selection of date.
If I select date 4/2/2017, I hope this result:
Cod_Contratante Date Max(Date)
1 1/2/2017 2/2/2017
1 2/2/2017 2/2/2017
2 4/2/2016 4/2/2017
2 3/3/2017 3/3/3017
this last registry did not exit in my current selection, and the Max(Date) change.
Please What can I do?
max(total <Cod_Contratante> Date)
Hi,
I have another problem:
Año_Emision_Poliza | Mes_Emision_Poliza | Num_Poliza | Estado_Poliza | Cod_Contratante | Fecha_Emision_Poliza | Max(Total<Cod_Contratante> Fecha_Emision_Poliza) |
2016 | dic | 0000001302 | CADUCADA | 021790037665001 | 09/12/2016 | 16/12/2016 |
2016 | dic | 0000002360 | ANULADA | 021790037665001 | 09/12/2016 | 16/12/2016 |
2016 | dic | 0000002492 | VIGENTE | 021790037665001 | 12/12/2016 | 16/12/2016 |
2016 | dic | 0000004626 | VIGENTE | 021790037665001 | 12/12/2016 | 16/12/2016 |
2016 | dic | 0000002492 | VIGENTE | 021790037665001 | 16/12/2016 | 16/12/2016 |
2016 | dic | 0000002501 | VIGENTE | 021790037665001 | 16/12/2016 | 16/12/2016 |
2016 | dic | 0000001491 | RENOVADA | 000910134527 | 04/12/2016 | 27/12/2016 |
2016 | dic | 0000001454 | VIGENTE | 000910134527 | 21/12/2016 | 27/12/2016 |
2016 | dic | 0000003134 | CANCELADA | 000910134527 | 27/12/2016 | 27/12/2016 |
Now, I can count Cod_Contrante, but only Estado_Poliza-={'CANCELADA','ANULADA'} and with the max(Fecha_Emision).
Count(distinct {<Fecha_Emision_Poliza={'=Max(Total<Cod_Contratante> Fecha_Emision_Poliza)'},Estado_Poliza-={'CANCELADA','ANULADA'}>}Cod_Contratante)
and I hope my result : Count(distinct {<Fecha_Emision_Poliza={'=Max(Total<Cod_Contratante> Fecha_Emision_Poliza)'},Estado_Poliza-={'CANCELADA','ANULADA'}>}Cod_Contratante)=1 but it is not my result.