Forum Discussion
Count Something in Last N Days
ok. can you make the necessary changes noted above, including getting rid of the time component of the field?
Changed all dates in all tables to date only, no time. then checked the relationships again (attached photos). and there are no blanks in AD_Status, Created. Still is blank. Wish I could attach the bi file here.
- edhans6 years ago
Community Champion
CW112358 - see this file. I made the following changes:
- Added a new column to your data table called DateKey which is the date only based on Created - DateTime.Date([Created])
- I updated the varStartDate and varEndDate to use this new DateKey field.
- Saved the tables and loaded into the model.
- Updated the relationship to link Date[Date] to Table[DateKey] as a one-to-many.
The other things you need to do if trying to replicate this in your model is
- make sure the Date table is marked as a date table:
- Disable auto-date-time. Ensure it is disabled globally, and for the current files. Disabling globally will disable for new files, but you might have to disable in older files if you add a true date table.
- Current File SettingsGlobal Settings
Ping back with any questions.
- CW1123586 years ago
Helper II
Thanks for all the help! Sorry its taking me so long to get back to you. I'm still working at work which is crazy with all of this so its been pretty stressful. I tried to create that new DateKey and I got this error?
- CW1123586 years ago
Helper II
Figured that out. K let me do the rest.