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?
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!
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.
@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:
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.
Use your browser console when doing requests and look in the response data - either json_query > query > filter or in data > native_form > query
@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.