Hi all! I’ve been banging my head against a wall for about a week now trying myriad ways of solving this challenge, and after countless hours of reading and watching videos, I’m turning to the community hoping someone here can guide me in the right direction.
Input:
Two tables that tracks cases, each from a different vendor, and is updated every workday. Each case has an upload date, an ID, and a value, among other fields. TABLE A has the most recent upload date as the current workday, and TABLE B has the most recent upload date as the previous work day. Each time the table is updated, new rows are added, and the existing rows remain. Sometimes the new rows are new cases, sometimes new rows have the same ID with updated values, and sometimes the new rows are exactly the same case from the previous update. From my research, this table is closely related to a slow changing dimension type 2.
In PQ, I appended these two tables together as the ‘All Data’ table.
There’s also a third TABLE C explained below
Use Case:
Each case must be put into one of three buckets, Active, Cancelled, or Approved.
Active bucket = case has the most recent upload date
Cancelled bucket = case dropped off the most recent upload date
Approved bucket = a third TABLE C, with list of approved case IDs
The Problem:
User wants to dynamically filter the ‘All Data’ table so that it shows all the cases ‘as of’ a date. For example, if user slices by Last Month, the max and min date will be 2/28/23 and 2/1/23, respectively, meaning the most recent upload date on the All Data table should be 2/28/23, and all cases would fall in there respective buckets as of this date.
Restrictions:
I do not have access to the SQL table. And I cannot use direct query.
SCDsample.pbix (92.4 KB)
SCDsample.xlsx (27.8 KB)
Any help would be greatly appreciated!