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

Display Selection in a Title (ex: Jan - Nov)

I have a calendar selector on the screen showing Jan, Feb, Mar and so on. If the user highlights multiple months such as Jan - Nov I would like the graph title to say something like "Selections for Jan - Nov"

If they don't choose sequential months it would be nice to just list all the months. This isnt necessary though, just nice.

Thanks!

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Huh. I'm sure I'm missing something obvious, and that this isn't the right solution, but you can probably force it to work like this:

month(makedate(2010,min(Month))) & ' - ' & month(makedate(2010,max(Month)))

View solution in original post

4 Replies
johnw
Champion III
Champion III

Maybe this?

='Selections for ' & if(max(Month)-min(Month)+1=getselectedcount(Month),min(Month) & ' - ' & max(Month),getfieldselections(Month))

Not applicable
Author

Hey John works great i just have one weird case. It shows "7 - 10" if i have Jul through Oct selected. I would like it to show "Jul - Oct". I tried changing the section of your code to this:

month(min(Month) & ' - ' & month(max(Month))

For some reason it then displays "Jan - Jan " with the same selection. If i get rid of the month() function it works fine with number ("7-10") but I cant seem to get it to display "Jul - Oct". I tried Date(max(month),'MMM') as well but it has the same effects as month().

Thanks

johnw
Champion III
Champion III

Huh. I'm sure I'm missing something obvious, and that this isn't the right solution, but you can probably force it to work like this:

month(makedate(2010,min(Month))) & ' - ' & month(makedate(2010,max(Month)))

Not applicable
Author

Yep that works fine. Thanks John!