Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
mr_lampert
Contributor III
Contributor III

Search Value for Table in Table

Hello Community,


this is my first question as QlikView newbie in this group so ... HURRA This is my question:

I have a table, which contains data sets from 01.01.2017 to today. For example, the following inline table:


TEST_TABLE:

LOAD* INLINE

[

    Date, value

    2017.04.17, 26

    2017.04.18, 2

    2017.04.19, 37

    2017.04.20, 41

    2017.04.21, 85

    2017.04.22, 44

    2017.04.23, 67

    2017.04.24, 1

    2017.04.25, 58

    2017.04.26, 45

    2017.04.27, 28

    2017.04.28, 73

    2017.04.29, 55

    2017.04.30, 92

    2018.04.18, 49

    2018.04.19, 99

    2018.04.20, 81

    2018.04.21, 66

    2018.04.22, 69

    2018.04.23, 57

    2018.04.24, 10

    2018.04.25, 22

    2018.04.26, 75

    2018.04.27, 61

    2018.04.28, 37

    2018.04.29, 39

    2018.04.30, 15

];


Now to the task: the current day should be compared to the value of the previous year. So should stand for the 2018.04.23 the value 57 and in the next column, the value 67 for the 2017/04/23. We can solve this scenario in the script or on the surface in a table with a formula. In order to learn something, I would like to see both possibilities as well


The result should look like this:

DateValueLast Year
2018.04.235767
2018.04.24101
2018.04.252258
2018.04.267545
2018.04.276128
2018.04.283773
2018.04.293955


I hope the example of my problem is well explained and I look forward to feedback on my first post


Best regards

David

1 Solution

Accepted Solutions
olivierrobin
Specialist III
Specialist III

hello

you can try that

left join(TEST_TABLE)
load
AddYears(Date,+1) as Date,
value as Hist_value
resident TEST_TABLE;

View solution in original post

4 Replies
sunny_talwar

For doing this in the script, I would suggest looking into The As-Of Table

olivierrobin
Specialist III
Specialist III

hello

you can try that

left join(TEST_TABLE)
load
AddYears(Date,+1) as Date,
value as Hist_value
resident TEST_TABLE;

mr_lampert
Contributor III
Contributor III
Author

Very interesting link! Thank you!

mr_lampert
Contributor III
Contributor III
Author

This works fine in the script! Thank you very much!