Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
Highlighted
f1234567
New Contributor III

Compare data with previous data

Hello everybody,

I am struggling with a possibly simple task.

I have upload-dates for each record, i.e.

e.g.   

Prod, Marker, loaded

A,  ,   01.01.2017

B, A,  01.01.2017

A, ,    15.01.2017

B, ,    15.01.2017

C, ,    15.01.2017

D, ,    15.01.2017

A, ,    01.02.2017

B, A,  01.02.2017

C, ,    01.02.2017

D, ,    15.02.2017

E, ,    15.02.2017

A, ,    01.03.2017

B, A,  01.03.2017

C, A,  02.03.2017

D, A,  02.03.2017

 

   

Now, I would like to select ONE Date, e.g. "01.02.2017" and compare each product with the PREVIOUS data load.

So first thing to happen is that QV should find out what was the previous date. In the example it would be "15.01.2017".

Then  compare the selection "01.02.2017" with "previous" (=> 15.01.2017) and find those products that have "Marker" = A on date of selection and had NO Marker on previous date.

So the result I would like to see only those with marker A (that had no marker on previous date, 15.1.2015):

   

ProdMarkerloaded
BA01.02.2017

I have tried with previous() and peek() and others and have had no success.

Hopefully one of you experts have a Suggestion for me.

Many thanks in advance!

1 Solution

Accepted Solutions
Highlighted

Re: Compare data with previous data

If you select below? Is that output you are expecting?

Capture.PNG

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

5 Replies
Highlighted

Re: Compare data with previous data

If you select below? Is that output you are expecting?

Capture.PNG

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

Highlighted
f1234567
New Contributor III

Re: Compare data with previous data

Hi there!
Thanks very much. But what I need is, that the user clicks on ONE Date only.

Say we click on "01.02.2017".

QV checks what was the previous data set, i.e., 15.01.2017, and then finds out that on 15.01. there was no marker compared to 01.02. where there is a marker "A"  for the product B.

In other words: a click on 01.02.2017 should give below result.

It should select those products which have been marked at the date selected when comparing it with the last date.

ProdMarkerloaded
BA01.02.2017
Highlighted
Partner
Partner

Re: Compare data with previous data

! !HI Frank,

It is not prefect but it is nearly there.

You have to Seletec the dat and the Product or Products your Interested in.

Mark

Highlighted
f1234567
New Contributor III

Re: Compare data with previous data

I checked your qvw. It's perfect! Many thanks.

Highlighted
f1234567
New Contributor III

Re: Compare data with previous data

Thanks, Mark! Good idea.

( Though it seems it is a bit too complicated for me 😉  )