Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
samuel_brierley
Creator
Creator

using above on an expression

Hi all,

is it possible in an expression to use above on its self? so for example my calculated field may be;

above(myfself,1)- 100

i would use an ifnull put 1000 to account for the first field being null so it would go

Calculated field

1000

900

800

and so on

thats a very simplistic example but hopefully is enough to trigger some good ideas.

Labels (1)
1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

Actually you CAN directly reference the same column - but using helper columns can help you break down the challenge of creating a solution into a more stepwise approach making it easier to solve.

Look at what I have attached it is close to what you want - but I didn't quite understand all of your explanation of logic. Have a loook at it and see if you can make it work for you:

2015-10-11 #4.PNG

View solution in original post

6 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

if you look to create a floating dimension with no connection to the data

you can use valueloop function

=ValueLoop(1000,0,-100)

petter
Partner - Champion III
Partner - Champion III

You cannot directly reference the same column but you can achieve what you want by using an intermediate/helper column. If you need you can hide this helper column because it is not normally useful except for this particular function.

samuel_brierley
Creator
Creator
Author

i think the help column may be the way to go however im confusing myself as to how i would set that up.

ill make an attempt to explain;

abC
1051000
2010900
30101000
4051100

what i want my formula to do is starting at 1000 if column a is less than 21 AND column b is greater than 5 then minus 100, if not add 100.

C represents what the result would be

petter
Partner - Champion III
Partner - Champion III

Actually you CAN directly reference the same column - but using helper columns can help you break down the challenge of creating a solution into a more stepwise approach making it easier to solve.

Look at what I have attached it is close to what you want - but I didn't quite understand all of your explanation of logic. Have a loook at it and see if you can make it work for you:

2015-10-11 #4.PNG

samuel_brierley
Creator
Creator
Author

Brilliant thank you!!

petter
Partner - Champion III
Partner - Champion III

My pleasure - please mark the question as answered so the thread can be closed