Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I am having issues with a tracking report I have created. The data looks like the following within the database:
Item Type | Event Time | User | Comment | Workstation |
Slide A | 1/4/23 12:37pm | Jane | Delievered | W340 |
Draft | 1/4/23 11:23am | Jane | Put in drop box | W340 |
Slide B | 1/4/23 10:02 | Julie | W503 | |
Slide A | 1/4/23 10:01am | Julie | Sent to Lab | W503 |
Info about the tracking system. The latest comment always appears at the time and all types are tracked under the same database table. We do not care about infomation of the user or the work station. Whether it is a slide or draft, we want the lastest comment to diplay.
The table visual in the report has other identifying information with joined tables. It is a direct query. It looks like the following:
Case No. | Status | Case opened date | Priority | Last scan status(Comment) | Last Scan date(Event time) |
s-1 | Grossing | 1/2/23 9:00am | 2 | Put In Mailbox | 1/3/23 12:00pm |
s-4 | Complete | 1/1/23 9:17am | 1 | With Doctor | 1/3/23 2:30pm |
s-34 | Grossing | 1/3/23 9:13am | 3 | Sent to Lab | 1/3/23 10:23am |
So we do not want to show any blank comments so I removed blanks or null from the filter. Cases have multiple status but we only want to show the lastest status date with a comment. What I am running into is sometimes the table does not show the latest date and comment. Since the system puts the latest comment on the first row, I aggregated "Last scan status" to show the first comment and the "last scan date" to show the latest time.
The gets it so that there is only one line per case on the table. If I do dont summarize, it gives all the scans on one case. We do not want that. But the case just randomly will not show the correct "last scan status" but it will show the "latest scan date." Is there a way to create a formula to display this information correctly and accurately. I have tried everything I can think of and have had no success. I checked my SQL query to just confirm there was no issues there and that was fine.
I appreciate the help.
Solved! Go to Solution.
@DKwustl Maybe:
Last scan status measure =
VAR __LastScanDate = MAX('Table',[Event Time])
VAR __LastStatus = MAXX(FILTER('Table',[Event Time] = __LastScanDate),[Comment])
RETURN
__LastScanDate
@DKwustl Maybe:
Last scan status measure =
VAR __LastScanDate = MAX('Table',[Event Time])
VAR __LastStatus = MAXX(FILTER('Table',[Event Time] = __LastScanDate),[Comment])
RETURN
__LastScanDate
I feel like this is working but I want to make sure with todays results. I still had one that did not display the correct comment. It makes me feel it could be a scanning issue.
I feel like I attempted this one but let me try again just to be sure.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.