Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
So you have two fields, Dias_Plazo and Date, and three variables. The user sets the variables and you want to look up the max Dias_Plazo for the Date field value that equals the created date using the variables?
Maybe like
=max( if(Date=makedate(var_ano_1,var_mes_1,var_dia_1),Dias_Plazo))
or
=max({<Date= {$(=makedate(var_ano_1,var_mes_1,var_dia_1))}>} Dias_Plazo)
The aggr() function does not take calculated dimensions, only fields, and all arguments after the very first are dimensions to the aggr() function. So MakeDate() is not allowed as second argument / aggr() dimension.
I am not quite sure what you want to achieve with your expression, are you maybe looking for something like the FirstSortedValue() function?
FirstSortedValue () function does not accept duplicate values in the sort field,
= Firstsortedvalue (Dias_Plazo, MAKEDATE (var_ano_1, var_mes_1, var_dia_1)).
in case of a repeat date me sent null
help me please
You can use DISTINCT qualifier to get an answer:
=FirstSortedValue(DISTINCT Dias_Plazo, .....)
I still don't get what you are trying to achieve with the makedate() function. I assume var_ano_1 etc are variables, right?
Can you give us an example input and desired output?
variables are var_ano_1 etc.
I have a
Dos Campos:
Dias_Plazo and Date (var_ano_1, var_dia_1, var_mes_1)
20 - 02.01.2012
30 - 02.01.2012
40, 03.01.2012
I need to get for example the value 30 of field Dias_plazo, and he has the same date as the value 20.
How do I get the value if both have the same date
So you have two fields, Dias_Plazo and Date, and three variables. The user sets the variables and you want to look up the max Dias_Plazo for the Date field value that equals the created date using the variables?
Maybe like
=max( if(Date=makedate(var_ano_1,var_mes_1,var_dia_1),Dias_Plazo))
or
=max({<Date= {$(=makedate(var_ano_1,var_mes_1,var_dia_1))}>} Dias_Plazo)
Thank you,
I worked the first option
thank you very much