Show Empty Values in Pivot Table

Hi everyone, I recently update Metabase for v0.38.0 and use Pivot Table to show a “Shared Calendar” for my employees to schedule services.

But my question is: I have employees without service, and I would like to show these employees in my “Shared Calendar”.

Anyone tip to show these employees without service scheduled?

Ordens de Serviço = Services
Usuarios = Employees

{
“browser-info”: {
“language”: “en”,
“platform”: “Win32”,
“userAgent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“file.encoding”: “UTF-8”,
“java.runtime.name”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “11.0.10+9”,
“java.vendor”: “AdoptOpenJDK”,
“java.vendor.url”: “https://adoptopenjdk.net/”,
“java.version”: “11.0.10”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “11.0.10+9”,
“os.name”: “Linux”,
“os.version”: “3.10.0-1127.19.1.el7.x86_64”,
“user.language”: “en”,
“user.timezone”: “GMT”
},
“metabase-info”: {
“databases”: [
“mysql”,
“postgres”,
“h2”
],
“hosting-env”: “unknown”,
“application-database”: “postgres”,
“application-database-details”: {
“database”: {
“name”: “PostgreSQL”,
“version”: “9.6.20”
},
“jdbc-driver”: {
“name”: “PostgreSQL JDBC Driver”,
“version”: “42.2.18”
}
},
“run-mode”: “prod”,
“version”: {
“date”: “2021-02-16”,
“tag”: “v0.38.0”,
“branch”: “release-x.38.x”,
“hash”: “471aa51”
},
“settings”: {
“report-timezone”: “America/Sao_Paulo”
}
}
}

Hi @yuriandreoli
But are employees being returned? I would guess that you would need to use the employee table as the first source, and then join the schedule, and group by employee name.

@flamber I tried this approach, but still doesnt work. The return shows only employees with service scheduled, employees with empty schedule doesnt return.

I think that my error is because I filter a column date, and that`s make sense, the results will return only the employees with services schedule in the date that I filter.

Only solution that I think is using custom expression to filter employees with date column empty or with a specific date, but actually Metabase doesn`t permit “date is empty or date = 2020/02/02” in custom expression, for example :pensive:

EDITED: I solved my problem using CountIf(interval([Schedule], 0, “week”) OR [Schedule] = “”) rather than custom expression.

@yuriandreoli Custom Expressions will allow null/empty checks in 0.39.0 most likely.
But nice little hacky workaround - alternatively is to use SQL until CE functions are more advanced.

1 Like