Forum Discussion
Point in Time Comparison
- 2 years ago
Hi trb7fh
I've prepared your required output in the power BI data model visualization as shown below. In Power BI, the best practice is to utilize data model instead of combining in one table all the data. For this type of requirement where there are two dates columns in a fact table to calculate duration, the standard way to solve is to use a disconnected calendar (date) dable.
First, I created a separate calendar table by writing the following dax table formula.
Additionally, I created a calculated column to distinguish the 1st date in a month and other days in the calendar table (I am sure there's a way to combine this in the table formula above, but I couldn't do it quickly, hence a calculated column was created).
The data model looks like below where there are no relationship between the fact table and the calendar table (it's called a disconnected table).
In order to express the open items with respect to the time dimension, I've written dax measure like below:
Additionally, I've written a list of concatenatedXed ID to identify which ID are open at any particular date which can be cross filtered by the month and year matrix table visualization.
The resultant visualization is as shown below, where you can toggle between 1st day and other slicer to get beginning of the month and end of the month status.
I attach the pbix file link below:
CHERWELL_INCIDENT_TRACKING.pbix
BTW, just out of curiosity, is your old system Tableau?
Hello!
I sincerely appreciate the thorough response. Max Date was missed, but I was able to figure it out easily from your test file. I've also included it below in case anyone comes across this thread in the future looking for answers. Otherwise, I was able to recreate it in our file and it works perfectly! I figured a date table would be needed, since the source table was created by an outside source (and all existing in one table), but I'm not very familiar with them and had only seen them as a connected table so I wasn't sure how to go about building for this particular question.
The old system from my previous job was Looker.