Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
elenarelinque
Creator
Creator

Relation between tables problems with dates

I have a table with production orders  ("Datos produccion"" and another one with production orders rejected because of defects in the product ("P_INFO_RECHAZOS":

elenarelinque_0-1657537219871.png

 

"Datos_produccion" is my main table so I'm using the field "Date" in my visualizations. However, in one order of production I can have differents registers of defective material but I cant' sum them because the field "Codigo_defecto" is different and I need this.

The problem is that the date of rejection is not the same as the date of production (the field I use in my visualizations) so I have material rejected in june,for example, that was rejected un July but june is the date of production not rejection. If I use the date of rejection in this particular visualization, the filter indicated doesn't work because those are using the date of production:

 

elenarelinque_1-1657537624729.png

Thanks in advance!

 

 

2 Replies
ggijben
Partner - Creator II
Partner - Creator II

Hi @elenarelinque ,

This is what they call a Canonical Calendar. See https://community.qlik.com/t5/Qlik-Design-Blog/Canonical-Date/ba-p/1463578 

You will need a linktable the match the different date types. I created an example QVF. Then you can use 1 Month filter for both types.

1.png2.png

 

elenarelinque
Creator
Creator
Author

Thank you so much, it almost works. The problem is that I have another table with a different date. I tried to do the same with this table but it creates a synthetic key and doesn't show data from the table "PARTES". The table "PARTES" is related with the table "Datos_Producción" by the field "FECHA_TURNO_MAQUINA" and the table "P_INFO_RECHAZOS" is connected to the table "Datos_Producción" by the field "ORDEN_DE_FABRICACION" but there is no direct relation between the tables "PARTES" and "P_INFO_RECHAZOS":

 

elenarelinque_0-1657553909517.png

 

elenarelinque_1-1657553956613.png

Thank you so much for your help!