
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculation on above Dimensional Value
Hi - I have a straight table and like to check if the dimensional value matches the value above: I've looked at the Above() function, but this seems to be for expressions and not dimensional values.
Looking for something like this:
If (Person = Person on Previous Row, THEN Same, ELSE Different)
Eg:
Row | Person (Sorted Alphabetically) | Dimensional Calculation |
---|---|---|
1 | David | - |
2 | John | Different (to Row 1) |
3 | John | Same (as Row 2) |
4 | Johnathan | Different (to Row 3) |
5 | Steve | Different (to Row 4) |
6 | Steve | Same (as Row 5) |
Help appreciated
Jay
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Screen shots above?
Load *, RowNo() as Row Inline [
]
Straight table:
Calculated dimension: =Dual(Email, Row)
Expression: =If( Email=Above(Email), 'Same', 'Different')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As i understand, Use this? And, I always recommend you to create in script
LOAD Row,
[Person (Sorted Alphabetically)],
If(Row, Previous(Row)) as [Dimension Calculation]
FROM
[https://community.qlik.com/message/1271470]
(html, codepage is 1252, embedded labels, table is @1);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anil - that's not quite what I'm expecting...I added the Row column to help with the understanding of the problem.
Problem:
For the current row, I want to check the dimensional value of the previous row to determine if the same value.
Jay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be not understand fully? Would you tell us expected result, That may helps

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi - For simplicity, My qlikview straight table looks like this: (The duplicates are expected and needed).
Person1@email.com |
Person2@email.com |
Person2@email.com |
Person2@email.com |
Person3@email.com |
Person3@email.com |
Person4@email.com |
I want this output:
Check | |
---|---|
Person1@email.com | |
Person2@email.com | Different |
Person2@email.com | Same |
Person2@email.com | Same |
Person3@email.com | Different |
Person3@email.com | Same |
Person4@email.com | Different |
Thanks, Jay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Like this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tresesco B - Any chance you can put the code into a text file? I'm running a personal edition today and unable to open the file
Thanks Jay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are expecting same as Tresco suggestion, This may be
If(Email = Previous(Email),'Same','Different')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Screen shots above?
Load *, RowNo() as Row Inline [
]
Straight table:
Calculated dimension: =Dual(Email, Row)
Expression: =If( Email=Above(Email), 'Same', 'Different')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
'Previous' is not a valid function

- « Previous Replies
-
- 1
- 2
- Next Replies »