Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Showing first and last of a selected range in a chart title

I have a data range of 2 years. Users of my application may wish to select any month from this or a combination of months and render a Pareto chart based on the date range they select. I would like to have the chart render the first and last months (CalendarMonth) selected in title of the chart (as opposed to ('7 of 24 selected')

Any ideas?

Thanks

6 Replies
marcus_sommer

I think you could use min(YearMonth) and max(YearMonth).

- Marcus

Not applicable
Author

Hi,

If you want to show the list of selected fields in title please try this expression in  properties->General tap

->Title

=GetFieldSelections(FieldName)

Hope i understand your requirement and this will helps you

Not applicable
Author

=GetFieldSelections(FieldName) will give me back what I select (as expected). It can be modified to provide more or less field selections

Returns a string with the current selections in a field.

ValueSep is the separator to be put between field values. The default is ', '.

Maxvalues is the maximum number of field values to be individually listed. When a larger number of values is selected the format 'x of y values' will be used instead. The default is 6.

Examples

getfieldselections ( Year )

getfieldselections ( Year, '; ' )

getfieldselections ( Year, '; ' , 10 )

What I am specifically looking for is: If a user were to select a range of "CalendarMonths", instead of either the chart showing all the months selected or '7 of 12', I would like to chart to render Jan 2013 - July 2013 (for example)

Not applicable
Author

I have not had success integrating this into =GetFieldSelections(FieldName).......

marcus_sommer

As earlier mentioned the approach from min/max worked generally for your request. It cuold be also combined and formatted, perhaps so: date(min(YOURDATE), 'MMM YYYY') & ' - ' & date(max(YOURDATE), 'MMM YYYY').

Also would be getfieldselections() work, if you pick your first and last item from result, perhaps so: subfield(getfieldselections(Month, '|', 12), '|', 1).

- Marcus

Not applicable
Author

So, with a little manipulation, and accounting for the possibility that my users would select a single month, I came up with the following...

=if(GetFieldSelections(CalendarMonthName) =1,

  GetFieldSelections(CalendarMonthName),

subfield(getfieldselections(CalendarMonthName, '|', 100), '|', 1)

&' - '

&subfield(getfieldselections(CalendarMonthName, '|', 100), '|', GetSelectedCount(CalendarMonthName)

  ))

Thank you Marcus, your assistance really got me where I needed to go.....