Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
Are there more than one dimension in your table? If there are, then try this
Above(TOTAL TimeEnd)
Based on the sorting, you would either need above or below functions
If(TimeEnd = Above(TimeStart), ....)
or
If(TimeEnd = Below(TimeStart), ....)
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
Are there more than one dimension in your table? If there are, then try this
Above(TOTAL TimeEnd)
Hi,
maybe creating a flag in the script like:
LOAD TimeStart,
TimeEnd,
TimeStart=Previous(TimeEnd) as flag
From YourSource;
hope this helps
regards
Marco
Exactly!
Thank you very much!