Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with dates.

Hi all!

i need your help.

Ok let my explain.

i have 5 tables  (in this example, see photo only 3 but original are 5)

Capture.PNG.png

I need link a calendar to the date of the table "per".

And this will be the primary date.

The problem if is that not filter to other tables (con) if i select a date apply to per, but not from there. a simple example.

Capture1.PNG.png

THANKS

6 Replies
chiru_thota
Specialist
Specialist

Hi,

I guess your data model won't support what you want to achieve.

Because when you select a particular date from PER_FROM_DATE it will reduce the other tables data by common columns not by date.you need to change your data model.

following post will help you .

Filter two date fields at once?

Not applicable
Author

i think i can link it with a central table, with key from both dates?

i am looking traing do this.

to consider is that i have 5 tables like this and has 3millon records to 10 millons

regards

Not applicable
Author

Hola Federico,

Para esto quizás podrías usar una tabla de linkeo como comentan anteriormente, o también concatenar las tablas con movimientos, las que tienen fechas. Al hacer la concatenación llamas a todos los campos fecha con el mismo nombre, de modo que en el mismo campo te queden todas las fechas de las distintas tabltas. Luego vinculas a ese campo la tabla calendario y toda seleccion que hagas de tiempo va a aplicar sobre todas las fechas de las tablas.

Al hacer esta concatenación es importante usar banderas para poder continuar identificando cada registro a que tabla (o tipo de información) pertenece, por ejemplo para luego analizar la información requerida en cada objeto.

Espero haberte ayudado y cualquier pregunta avísame.

Saludos,

Not applicable
Author

podrias reflejarlo conmn el ejemplo que he dado? Muchas gracias

Not applicable
Author

Si claro,

La tabla concatenada podría quedar como lo siguiente:

IDDateTo_DateTableFlag
120100101201006011
220120101201201011
320110801201206011
420140101201401011
332520100101201006012
332520100602 2
520320120104201209112
520320120912 2
....2
10020100101201006013
10020100602201012013
10020101202 3
20320120101 3
....3

El campo TableFlag es una bandera que identifica a que tipo de información corresponde cada fila, por ejemplo, 1 - tabla PER, 2 - tabla CLI, y 3 - tabla CON.

Luego su tabla de calendario debe vincularla al campo Date de esta tabla, el cual representa el campo From_Date de todas las tablas. Entonces toda selección que haga filtrará las 3 tablas a la vez. A su vez cuando quiera analizar los datos con objetos, debe agregar a las expresiones la condición TableFlag ={X} siendo X el numero que corresponde a la información que desea analizar o mostrar.

Los campos de ID y To_Date los unifique en uno solo cada uno, pero si desea también puede mantenerlos separados, 1 campo ID para cada tabla original y 1 campo To_Date para cada tabla original.

Cualquier consulta o aclaración avísame.

Saludos.

Not applicable
Author

MUCHAS GRACIAS POR LA INFO, POR SUERTE YA LO SOLUCIONE, CON LO QUE PLANTEAS TENDRIA UN PROBLEMA..

YO SI A MI CALENDARIO LO LINKARA CUANDO SELECCIONE UN CAMPO EN LA TABLA PER SOLO FILTRARIA POR AHI, YO EN VERDAD NECESITO QUE CON TENGO CUANDO SELECCIONO UNA FECHA EN PER,

NOSE SI ME ACLARO PERO BUENO, TE PASO EL SCRIPT QUE HE HECHO A VER SI ASI LO VES.

uN SALUDO MUCHAS GRACIAS