Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
eugeniyaromanov
Contributor III
Contributor III

Change date of field if field wasn't changed

Hello again everyone!

I have a question, it terrifies me for month already

I have a Table:

NameStatusDate
1Working01.10.2016
1Ill20.10.2016
1Working25.10.2016
1Fired28.03.2017
2Working01.12.2016
3Working30.12.2015
3Vacation01.08.2016
3Working20.08.2016

I need to calculate number or workers, for example on 01.02.2017.

And I need it to be 3.

How do i get field up to a specific date if it's not in chosen period but it haven't changed to a chosen period.

Am I succeed in explanation?

7 Replies
eugeniyaromanov
Contributor III
Contributor III
Author

Can anyone help?

Anil_Babu_Samineni

May be confusing with the date field. Would you let me know what was the expecting output from given data

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable

Do you want number of workers on a given date (like status = "Working")?? If the record is not present on that date, should we consider the status of the nearest date in the past?? Can you add some clear example?

eugeniyaromanov
Contributor III
Contributor III
Author

Hi Anil!

Thank you for your concern!

I thought about it like another column or maybe it should be with intervalmatch... but notning...

I need to get number of workers on a date. The date could be any date.

The idea of table is workers and their status (work, ill, fired, on vacation etc.) but the date we have in table is only the date of moving to status.

For example worker1 was hired on 01.10.2016, than from 20.10.2016 to 24.10.2016 he was ill (24.10 we get from next date, when he was at work again), after that he was back at work (from 25.10.2016) and was fired yesterday (28.03.2017).

I need to count him as a working person (or ill, or fired) at any possible date (like on 01.02.2017 he must be counted as working; even if he doesn't have this status at the date, we know he worked, because status wasn't changed).

Please feel free to ask any question, should it help you to help me

BR

Anil_Babu_Samineni

Always you've mentioned 01.02.2017 but here we don't have that date in our tabular. From given data if you select any date then what was the expected to see in UI? better if you share few columns which you need

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
eugeniyaromanov
Contributor III
Contributor III
Author

Yes!!! Exactly what i need! If record isn't here, we should get the record from the nearest in the past.

The clearest example I can write is down below.

Please ask if anything isn't clear!

eugeniyaromanov
Contributor III
Contributor III
Author

But that is the point, to get data on date we don't have in our table.

Depending on previous status.