Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
alespooletto
Creator
Creator

What's wrong with my data model? When I filter for a date, I get different dates within the filter

I have the following data model

alespooletto_0-1707123839637.png

alespooletto_1-1707123963562.png

 

The relevant fields are the Date and DateTime for the ActivityLog table, and the LABOR_LOG_START and LABOR_LOG_END for the LABOR_LOG table. I have an issue such that, when I look for a specific date in which a product was made, I select the date, but the START and END dates give me wrong results like different days. This is what happens:

alespooletto_3-1707124043841.png

 

You can see, the date selected is 02/02/2024 but the other columns show me data from the 30/01/2024. How can I fix this? I thought the right columns are linked with each others, maybe I need a join?  

 

Labels (1)
4 Replies
LRuCelver
Partner - Creator III
Partner - Creator III

Are you including / "passing along" the date for all keys between the field you are filtering and the LABOR_LOG_START and LABOR_LOG_END fields?

alespooletto
Creator
Creator
Author

@LRuCelver thank you for your response, I'm sorry though because I don't understand well what you're asking me. The date is taken from the ActivityLog table, but indeed the LABOR_LOG table has a different datetime. This is because that table in SQL contains the timestamps for when each product was started and finished by an employee

LRuCelver
Partner - Creator III
Partner - Creator III

The ActivityLog and LABOR_LOG tables are linked via the LABOR_LOG_MEMBER table and two keys: SFC and LABOR_LOG_KEY.

If a date is selected in the ActivityLog table, does the SFC key guarantee that only rows for that date are selected in the LABOR_LOG_MEMBER table?

In the LABOR_LOG_MEMBER table, the fields SFC and LABOR_LOG_KEY need to be assigned such that the dates in the respective tables match each other. To ensure that, you need to "include" the dates in the keys or pass them along to assign the correct LABOR_LOG_KEYs to the SFC values.

alespooletto
Creator
Creator
Author

@LRuCelver Do you think a possible solution is to create a hybrid field that has the SFC and added with a hyphen the labor log key? such as 

"SFC_LABOR_LOG_KEY" ? 

 

Then I would have to make sure that the specific SFC is assigned to a single date only