Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a field called 'MonthName' with values Jan-Dec.
If multiple values are selected say Jan,Feb,Mar how to find the maximum of the month selected.
I tried giving Max(GetFieldSelections(MonthName)) but i dint ge the Max month selected. It was showing '-'.
Can anyone help me with a correct expression please?
Thanks!
=SubField('$(MonthNames)',';',Max(InvoiceMonth))
MonthNames is system Variable
InvoiceMonth you need to replace by your MonthFieldName
If you have created this field in the script using Month(), you could simply use max like:
If(GetSelectedCount(MonthName), Max(MonthName))
Hi,
just try max(MonthName)
Regards
Use below
=SubField('$(MonthNames)',';',Max(InvoiceMonth))
does the table have any date field then on selection of the months
do
MonthName(max([Date Filed]))
When i use the above expression its returning 'Jan1990' when Jun is selected.
It seems your monthname is text value not in the date format..
so you can simply load inline data for Monthname and value and link that with you model and then do max of value or else calculate your monthname from a date function.
Date(datefield,'MMM') as monthName
or
load * inline
[
monthname,value
Jan,1
Feb,2
Mar,3
soon
];
HTH
Sushil
Is 'MonthNames' an variable? And can i Know what is that InvoiceMonth.Is that the Month field used in you expression?
=SubField('$(MonthNames)',';',Max(InvoiceMonth))
MonthNames is system Variable
InvoiceMonth you need to replace by your MonthFieldName
Thanks a lot for the help.