Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have a YearMonth field (eg. 200901) from my datasource and want to create two ListBoxes one to select the year and another one to select the month.
The year ListBox has the function: =Year(MakeDate(left(JAHRMONAT,4), right(JAHRMONAT,2)))
and the month ListBox has the function =Month(MakeDate(left(JAHRMONAT,4), right(JAHRMONAT,2)))
I can select a year and the month are filtered but when I try to filter both the years filter was dropped. E.G. I select a year hold down the CTRL key and then selelect a month. Then is the month green but the year filter is dropped.
Is there a possibility to filter with both list boxes?
regards
Bastian
Bastian,
The problem is that when you make a selection in a calculated list box, you're actually selectin g values of the underlying fields. The same field is used in both boxes, so you simply making a new selection, not adding to the existing one.
The right thing to do is to separate the JAHRMONAT into two separate fields, Month and Year.
The wrong thing to do (if your prefer so) is to create one calculated list box for Month-Year, something like this:
month(makedate(left(JAHRMONAT 4), right(date,JAHRMONAT))) & '-' & left(JAHRMONAT,4)
Bastian,
The problem is that when you make a selection in a calculated list box, you're actually selectin g values of the underlying fields. The same field is used in both boxes, so you simply making a new selection, not adding to the existing one.
The right thing to do is to separate the JAHRMONAT into two separate fields, Month and Year.
The wrong thing to do (if your prefer so) is to create one calculated list box for Month-Year, something like this:
month(makedate(left(JAHRMONAT 4), right(date,JAHRMONAT))) & '-' & left(JAHRMONAT,4)
Dear Bastian,
It is not possible to use two separate list boxes on a single source data field. Also the Current Selections box will show the selection based on the source data field (JAHRMONAT). You should separate the field in your reload script, like this:
LOAD
Year(MakeDate(left(JAHRMONAT,4), right(JAHRMONAT,2))) AS Year,
Month(MakeDate(left(JAHRMONAT,4), right(JAHRMONAT,2))) as Month
Good luck!
regards Mark
Michael Solomovich wrote:The right thing to do is to separate the JAHRMONAT into two separate fields, Month and Year.
The wrong thing to do (if your prefer so) is to create one calculated list box for Month-Year
Right and wrong approaches for dates depend heavily on the application. If you want to compare specific months across years, it's easier to split apart Month and Year fields. But if you want to show a trend report by month for three years, it's easier to do that with a Month-Year field. In my applications at least, I much more often want months like "Jan 09" than simply "January", and I don't consider this wrong, as it is appropriate for my applications.
John,
My "wrong" qualifier is specific for the current situation. In fact, I always create Month-Year field - to the additon of "normal" Year, and Month fileds.