Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I've got table with date formatted like this:
It's YYYYWW (year - week)
And i did these two tables using mid(date, 1, 4) and mid(date, 5)
I also tried doing date: =Year(MakeWeekDate(mid(date, 1, 4), mid(date, 5), 1)), but it doesn't work.
And when i select week, I can't select year at the same time.
When week is selected and i select year, week de-selects and only year is selected.
Have you got any idea how to do this?
I don't know exactly what you have done, but this should work.
dates:
LOAD * INLINE [
date
201420
201421
201422
201423
201424
201425
];
realdates:
Load *, Year(realdate) as Year, Week(realdate) as Week;
Load
MakeWeekDate(mid(date, 1, 4), mid(date, 5), 1) as realdate
resident dates;
Drop table dates;
Rename Field realdate to date;
Please post your data model (from table viewer), it might seems that there is a wrong link between the datas.
Regards
By two tables, I assume you mean you made the two list boxes using the expressions.
When you use an expression in a list box, and you make selections, you are actually making a selection on the underlying field(s). Both these list boxes use the same underlying field, so your selection in the other box conflicts with the first selection.
You would be better off creating Year and Week fields in your load script and using these two fields, rather than the expressions.
I don't know exactly what you have done, but this should work.
dates:
LOAD * INLINE [
date
201420
201421
201422
201423
201424
201425
];
realdates:
Load *, Year(realdate) as Year, Week(realdate) as Week;
Load
MakeWeekDate(mid(date, 1, 4), mid(date, 5), 1) as realdate
resident dates;
Drop table dates;
Rename Field realdate to date;