Filters are not showing

I have an issue where all my questions do not show the filters (as per picture shown below):

All questions come from a custom SQL query

SELECT 
 
T.fecha AS Fecha,

CONCAT( P.apellidos,  ' ',P.nombre ) AS Paciente, 
CONCAT( A.apellidos,  ' ', A.nombre ) AS Doctor,

L.nombre AS Laboratorio,
IF(PD.liberado=1, "1", "") as Lib,
IF(PD.pagado=1, "1", "") as P,

ABS(PD.saldo - PD.abono -  PD.desc) + PD.abono as Ventas,

F.abreviatura as TPago,
PD.empresa as Emp,
(
SELECT CONCAT( M.apellidos,  ' ', M.nombre )
FROM adm_user M
WHERE M.id = B.id_vendedor
) AS  Vendedor,
C.porcentaje AS Porcentaje,
ABS(ROUND((PD.saldo -  PD.desc)*(C.porcentaje/100),2))  AS Comision


FROM test_completo T
INNER JOIN pagos_detalles PD ON PD.id_test_completo = T.id

INNER JOIN adm_empresa L ON T.id_empresa = L.id

INNER JOIN adm_user A ON T.id_doctor = A.id
INNER JOIN adm_user_doctor B ON A.id = B.id
INNER JOIN comisiones C ON C.id = B.id_comisiones
INNER JOIN pacientes P ON P.id = T.id_paciente
INNER JOIN adm_empresa E ON E.id= T.id_empresa
INNER JOIN forma_pago F ON F.idformapago = PD.tipopago
INNER JOIN registro_pagos R ON R.id_pagos_detalles = PD.id


ORDER BY Doctor ASC

Is there something missing on the SQL query? a bug?

  • Which version of Metabase are you using?
  • Did you recently upgrade?
  • Does this happen with new questions that you create, or only existing saved ones?
  • Is this only happening when you create a question where you’re using a SQL query as the source data?
  1. Version 0.31.1
  2. Yes I did. Though this was happening before the latest upgrade.
  3. It happens with new questions and existing ones.
  4. I cannot tell. All my data sources come from SQL Queries.

Hi, I was wondering if there is any information with regards to this.

Is it my sql query that is not right?
Here is another example. Thanks!

Hi @rviteri. I think your issue might have been resolved in version 0.31.2 which we just released on Friday:

I just updated to 0.31.2 but no luck. Issue persists.

Hmm, okay. Apologies for the inconvenience and thanks for the information, Ricardo. I’ll pass this along to the team.

Thanks! hope we can get this to fix.

Hello, are there any workarounds. At least to see what filters have been set? It is really hard to go back to a question after a while to change a filter. Thanks!

It seems that the filters work if you use a table from a database as source.

Hi @rviteri

I've just reproduced this - hurray :slight_smile:
image

@maz Steps to reproduce:

  1. Create a Native Query (SQL) and save.
  2. Create a Custom and select the Saved Query (I needed to refresh browser before it showed up, but that would be a different bug), add some Filtered By, and save.
  3. Reload the browser or use another browser in incognito and go to https://metabase/question/XX
2 Likes

@flamber @maz is there a workaround to at least be able to view somewhere else the applied filters? I am having a super hard time trying to figure all the applied filters once again.

@rviteri
I don’t have a quick-fix for you, but I’ve found a bug reference. Perhaps you can write a comment with more details and supply a couple of pictures, and maybe asking for a Priority label, since it makes Metabase non-functional:

1 Like

@flamber,

Is there anyway to look at where are the filters stored? I need to go back and tell what filters where applied but I have no idea where to look.

@rviteri
You have two ways to do that.

  1. Go to the internal Metabase database (hopefully you're not using H2, if you are, then you should migrate to Postgres or MariaDB/MySQL), find the table report_card, look for the card (either by id or name, and find all the filters in dataset_query.
  2. Use your browser console when doing requests and look in the response data - either json_query > query > filter or in data > native_form > query

Thanks. Worked out well.

Do you think this issue will be solved by the next version?

@rviteri
Currently 0.32.0 looks to be focused on making Metabase more modular and async, so it can connect to more datasources and so it feels faster. And that’s a major change, which is going to be awesome, but I hope following minor releases will focus on fixing bugs like this.

This is fixed in V.33. Thanks!