Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
The field Month is dual in my application - it is both numeric and string.
My task is to get a string value of the minimal Month selected by the user.
The formula min(Month) results in a numeriс value. How can I set it to give a string result?
Thank you in advacne,
Larisa
Thanks!
another one:
Month(Date#(Min(Month),'M'))
regards
Marco
Hi Larisa,
very,very strange that you need the DISTINCT qualifier here.
Just for interest, could you post a sample QVW with just that field?
Hi swuehl,
from help guide (i'm sorry, original italian) FirstSortedValue()
Se più valori di espressione condividono lo stesso sort-order minimo, la funzione restituirà NULL.
So, You need DISTINCT clause.
Hi Antonio,
I think in english it's:
If more than one value of expression share the same lowest sort-order, the function will return null.
I haven't considered that this will be enforced even if the 'value of expression' is essentially the same. But you are right.
And I thought the results were strange based on my testing with distinct calendar fields, so it was not the correct test setting to be sure.
Yes, this is misleading behavior.
Concat(Field,Separator,Sortvalue) has different behavior.
E.g. List of Products sorted by sales
Concat(DISTINCT Product,',',Aggr(NODISTINCT Sum(Sales),Product))
Regards,
Antonio