Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with join the values of one date of different callendars, and get the last avaliable value if a view doesn't have the date

Hi everyone,

I have a doubt with join different data, each one in a different calendar, and create a chart.

For example:

+++ Data 1 from view1 +++

     Date     Value

     23/08     5000

     24/08     4000

     25/08     4500

     28/08     6000

+++ Data 2 from view2 +++

     Date      Value

     23/08     8000

     24/08     10000

     25/08     5000

     26/08     6000

     27/08     7000

     28/08     8000

And I have to do this:

         Join the 2 tables, sum the values, and if I the date of one view don't have a value, get the last avaliable value.

          Example:

   

      Date      Value

     23/08     13000     (5000 + 8000)

     24/08     14000     (4000 + 10000)

     25/08     9500       (4500 + 5000)

     26/08     10500     (4500 + 6000)

     27/08     11500     (4500 + 7000)

     28/08     14000       (6000 + 8000)

See the problem? I don't know how to do this, and if I CAN do this in Qlikview.

If anyone knows how to solve this problem, please say the way. Thank you!!

1 Reply
Gysbert_Wassenaar

Concatenate the tables so you end up with only one table:

Result:

LOAD Date, Value, 'view1' as SourceView

from ...sourcetable1...;

LOAD Date, Value, 'view2' as SourceView

from ...sourcetable2...;

You can then create a table or chart with Date as dimension and the expression will then simply be sum(Value). And if you need to know where the data came from you can use the SourceView field to get that information.


talk is cheap, supply exceeds demand