Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Previous fact front-end

Hello!

I would like to know how to compare previous facts of a dimension in the front-end.

For exemple, I have a TimeStart and TimeEnd as:

TimeStart     TimeEnd

0:10               0:20

0:20               0:30

0:30               0:40

I would like to compare the first row of TimeEnd with the second row of TimeStart to check if there are equal.

I want to verify if each TimeStart corresponds with the above TimeEnd.

For exemple,

TimeStart     TimeEnd

0:10               0:20

0:15               0:30

In this exemple, the TimeEnd doesn´t match with the next TimeStart, 0:20<>0:15.

Thank you!

1 Solution

Accepted Solutions
sunny_talwar

Are there more than one dimension in your table? If there are, then try this

Above(TOTAL TimeEnd)

View solution in original post

5 Replies
sunny_talwar

Based on the sorting, you would either need above or below functions

If(TimeEnd = Above(TimeStart), ....)

or

If(TimeEnd = Below(TimeStart), ....)



Anonymous
Not applicable
Author

Thanks for your answer Sunny T,

It´s working but just for few rows.

An example:

TimeStart     TimeEnd     Above(TimeEnd)

0:10               0:20               -

0:20               0:30               -

0:30               0:40               -

0:40               0:50               0:40

If I have understood the function, the result should be:

TimeStart     TimeEnd     Above(TimeEnd)

0:10               0:20               -

0:20               0:30               0:20

0:30               0:40               0:30

0:40               0:50               0:40

sunny_talwar

Are there more than one dimension in your table? If there are, then try this

Above(TOTAL TimeEnd)

MarcoWedel

Hi,

maybe creating a flag in the script like:

LOAD TimeStart,

          TimeEnd,

          TimeStart=Previous(TimeEnd) as flag

From YourSource;

hope this helps

regards

Marco

Anonymous
Not applicable
Author

Exactly!

Thank you very much!