About
Reports can be created to show the number of cleaning jobs, patients admitted, or other aggregate values based on the Unit, for a specific date range. However, Tableau will not display the unit name if there are no results within the date range.
Solution
Understand the Scenario
We’ll use an example report using the EVS_STREAMING data source which is designed to show the number of Spill Cleans by Unit for today.
We want to see the V.TELE2 unit, even if there are no spill cleans. In this case, the number of spill cleans for V.TELE2 is 0 for Today and since there are no spill clean jobs, the jobs do not have a JOB_TYPE populated.
The only units that appear in the report are the ones that have at least one spill clean. This is because each record in this data source has the value UNIT, JOB_TYPE, and COMPLETED_TIMESTAMP, and the two filters shown will limit the results of the data pulled to both:
Records where the Completed Timestamp is from today.
Records where the Job Type = Spill Clean
Looking back, we now understand that there are two reasons why our V.TELE2 jobs would not show:
They are not included because they do not have a Completed Timestamp.
They are not included because the Job Type was not populated, because there are no jobs.
So we determine that none of the records shown will have a UNIT value of V.TELE2.
Update the Filters with a Calculated Field
Our solution to this example would be to remove the two filters and create a calculated field to show the number of records. We keep the requirements to focus the results to jobs of ‘Spill Clean’ AND ‘Completed Timestamp’ of TODAY. We also add an ELSE to populate the unit names that have no results with a 0 value.
This forces Tableau to include all units since the addition of our ELSE 0 updated the logic so that none of them are being excluded from the pulled data.
Open SPILL CLEANS 2.png.