Discussion Board for collaboration related to QlikView App Development.
So I have following Problem: i Need qlikview to look at two different rows from my data source and compare the values within. For further calculations in qlikview I Need it to find out the smaller number and hold it as a value for for example a new variable.
I apreciate every small hint, tip and help
If so far something isnt clear enough to you please just ask me to clarify
for your first request: "Need qlikview to look at two different rows from my data source and compare the values within"
what are the rows that you want to look into ?
for your second request: "I Need it to find out the smaller number and hold it as a value for for example a new variable."
where want to do it ? on the script or on the front end ?
Thank you very much for your fast Reply.
1.) These two rows are within my LOAD Document, which is an Excel table
2. I dont really care where I can implement it, as Long as it works it doesnt matter. However, it maybe usefull to know that the data source im using is significantly large and that a filter machanism is up front to filter the needed rows from the selected peer.
Thank you very much
Kind regards, max
First of all thank you for your fast reply
Im not allowed to give out any data, however, I can give you a Simulation:
so the data source are 2 rows from an Excel sheet with numbers in it looking as following: 620 or -450 ore what so ever.
in this example case the Output would Need to look like -450 however, I would also Need to convert the Output into a positive number and the final Output would be 450 in this case
so maybe you mean: Need qlikview to look at two different COLUMNS from my data source and compare the values within ?
would you be able to describe the expected output after the comparison ?
Yes excuse me, I mixed Things up.
so the Input data would look for example like
300 / 45
-250 / 2000
-634 / -4
and the Output would Need to look like:
I Need it to Hand out the smaller number or if there is no number smaller than 0, a Zero as Output
after this I Need to turn the Output positive, what should be possible with a FABS(x) Formula
try this on the script:
LOAD * Inline [
if(column1>=0 and column2>=0,0, if(column1<column2,column1,if(column2<column1, column2))) as final
May be like this:
if(Previous(ID) < ID, num(fabs(Previous(ID)),(#,##.0)),num(fabs(ID),(#,##.0))) as IDNew,
if(Previous(ID1) < ID1, num(fabs(Previous(ID1)),(#,##.0)),num(fabs(ID1),(#,##.0))) as ID1New
Drop table Input;