Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
lylererger
Creator II
Creator II

Single Date column with slowly changing dimention.

Hi friends.
I've got some problem.
Help me to solve it.

someProblem.png

I've got a single Date column and I know that's DateFrom, i'm searching for DateTo.

Some peace of my script:

_____________________________________________________________________

[temp]:

LOAD

  Date,

  SalesPoint,

  Manager

FROM

[$(vData2)\ManagersHistory.qvd](qvd)

Where Date>MakeDate(2013,1,1);

[temp2]:

LOAD

  *,

  if([Date]=Peek([Date]) and Manager=Peek(Manager),'???',date(Now())) as DateTill;

LOAD

  *

Resident temp

Order by

  Manager,

  Date desc;

DROP Table temp;

___________________________________________________

??? - I have no any Idea how to get date for those Manager.


For example, as we look above:

For the SalesPoint - X and Manager Y with DateFrom (01.02.2013) i need the Manager Z with DateFrom

(01.04.2013), DateTill should be for Manager Y. For the SalesPoint - X and Manager Y with DateFrom (01.02.2013)

For the SalesPoint - X and Manager Z with DateFrom (01.04.2013)

i need the Manager W with DateFrom (01.05.2013), DateTill should be for Manager Z..

And so on...

Pleace help me with that.
Thnx.

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

1 Reply
hic
Former Employee
Former Employee

I think you should take a look at the two following blog posts. I think they are relevant to what you want to do.

http://community.qlik.com/blogs/qlikviewdesignblog/2013/02/25/creating-intervals-from-change-dates       

http://community.qlik.com/blogs/qlikviewdesignblog/2013/06/03/slowly-changing-dimensions

HIC