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

Records that show how signals change over time

Hi all,

I have a table in my database that shows how the value of certain signals change over time. Everytime there's a change on a signal value, I have one record there:

SignalID, Timestamp, Value

1, 2018-12-12 00:12:00, 120

2, 2018-12-12 00:15:00, 100

1, 2018-12-12 00:15:05, 60

2, 2018-12-12 00:25:00, 180

I need to let users pick a date and time and see the values the signals had on that moment.

For example, a user should be able to pick 2018-12-12 00:20:00 (I guess I can use a calendar for that) and even though we don't have any record for that concrete time, see that the Signal 1 had 60 as value and Signal 2 had 100.

How can I do that in Qlik Sense? I'm not sure how to model my data, since until know I've been doing very straight forward things such as counting events.

Any help is welcomed. I'm having trouble to search in the community because I don't know if there's a name for what I'm trying to achieve.

Thanks,

Juan

Labels (2)
1 Solution

Accepted Solutions
morenoju
Partner - Specialist
Partner - Specialist
Author

Found it.
=FirstSortedValue({<Timestamp={"<=$(=Timestamp#(CalendarTimestamp))"}>}Value,-Timestamp)

View solution in original post

6 Replies
agni_gold
Specialist III
Specialist III

I think , it should be straight forward , simply load your table and show the values in straight table or any chart .
morenoju
Partner - Specialist
Partner - Specialist
Author

Thanks for your response.
Actually, it is a requirement for me to show a picker for dates and time and display the value of the signals on a map (bubbles proportional to the values), so a straight forward table would not work for me.
The issue I have is that if a user selects a time such as "2018-12-12 00:20:00" in the picker, strictly speaking there is no record for the Signals value. Although it should display the last changes they had (60 for Signal 1 and 100 for Signal).
agni_gold
Specialist III
Specialist III

for below :
" if a user selects a time such as "2018-12-12 00:20:00" in the picker, strictly speaking there is no record for the Signals value."

You have to find out/create some extension which popup msg based on your data .
Else i have another option, you show dropdown for date&time and if there is no value present for that particular time , it will come as greyed out in the dropdown.

Will it help ?

morenoju
Partner - Specialist
Partner - Specialist
Author

The problem with that is that if the user picks up "2018-12-12 00:15:00", the value 100 will be displayed for Signal 2 (ok), but no value for Signal 1 (it should be 120).
How do I tell Qlik to show the value of the last timestamp available before the one the user selected?
agni_gold
Specialist III
Specialist III

During no selection in date , just show the signal values for max date.
morenoju
Partner - Specialist
Partner - Specialist
Author

Found it.
=FirstSortedValue({<Timestamp={"<=$(=Timestamp#(CalendarTimestamp))"}>}Value,-Timestamp)