on 04-10-2019 7:45 PM
I am attempting to extract data from a database that has an error in it. I can't resolve the error (it's a "design feature"), so i have to try to query around it. Here's how it is stored.
Record ID | Create Date | Update Date | Record Status
123 | 05/01/2018 | 05/01/2018 | Active
123 | 05/08/2018 | 05/08/2018 | Active
123 | 05/15/2018 | 05/15/2018 | Closed
123 | 05/22/2018 | 05/22/2018 | Closed
456 | 06/02/2018 | 06/02/2018 | Pending
456 | 06/09/2018 | 06/09/2018 | Active
456 | 06/16/2018 | 06/16/2018 | Active
456 | 06/23/2018 | 06/23/2018 | Suspended
And so on. As you can see, the Create Date and Update Date values match on each row. The Create Date value is supposed to be the date the Record ID was initially created, but it's actually being captured as the date the Record ID update was created.
What I need is a report that brings me a single row per Record ID that shows me the minimum Create Date and the maximum Update Date, so that the result looks something like this:
Record ID | Create Date | Update Date | Record Status
123 | 05/01/2018 | 05/22/2018 | Closed
456 | 06/02/2018 | 06/23/2018 | Suspended
I've tried adding MIN and MAX variables, but that doesn't seem to have any effect on the data.
I'm relatively new to Business Objects (WEBI), though I think I'm picking up its concepts quickly. What am I missing here?
follow below steps.
Create variable Show/Hide=If([Update Date])=Max([Update Date]) In ([ID]) Then "Show" Else "Hide"
Apply table level filter on Show/Hide where equal to "Show".After that you will get one row for each ID.
Next step is use below formula in Create Date column to display min date.
=NoFilter(Min([Create Date]) In ([ID]))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That seems to be working. I'm still getting some duplicate lines, but I think I know what's causing those. I think I'll work your solution into a more complex query to see if it works in a broader application.
Store the MIN and MAX dates in two variables. Use them as a condition to pull the record in your query filters. Please see if this works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.