Jason Elkin Posted May 12, 2020 Share Posted May 12, 2020 I'm attempting to limit the data displayed by a visualization by comparing a date range set by the user with a property control. The date range is compared to the dttmspud column and is supposed to show "True" if the date is within the input range, and "False" if the datedoes not fall within the date range. The visualization would then be limited to only the data with a "True" result using the "limit data using expression"in column properties. I created two property controls that allow the user to pick a date which are identified by the "BeginDate" and "EndDate". The available dates are unique values from the dttmspud column which are the dates being compared to the date range chosen by the user. These dates are queried and are input in another program. An example value for the BeginDate and EndDate can be seen in the attached image in available properties for column. I've tried using the Date and DateTime function to make sure formatting is correct but doesn't help.Depending on the operator used, I get either all False or all True results. Link to comment Share on other sites More sharing options...
Jason Elkin Posted May 12, 2020 Author Share Posted May 12, 2020 Not sure why, butadding quotes to the property control dates being compared to the dttmspud date appears to fix the issue. The If statement looks as follows, if thequotations are removed it does not read the dates correctly If([DateTime([dttmspud]])] >= DateTime("${BeginDate}") And[DateTime([dttmspud]])] Link to comment Share on other sites More sharing options...
Shashank Gurnalkar Posted May 13, 2020 Share Posted May 13, 2020 When the document property type is not Integer/Real, you need to put it in the quotes when you are inserting it as a text. Instead, you can also insert it as value like: DocumentProperty("BeginDate") Apart from that, you can also avoid using the IF() loop because the expression itself is a boolean. ([DateTime([dttmspud]])] >= DateTime("${BeginDate}") And [DateTime([dttmspud]])] Link to comment Share on other sites More sharing options...
Jason Elkin Posted May 18, 2020 Author Share Posted May 18, 2020 Thank you for the help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now