
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Comparing values and choosing the smaller value?
Hello guys,
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
Kind regards,
Max
- « Previous Replies
-
- 1
- 2
- Next Replies »

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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 ?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you share some sample data and your expected output please?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Youssef,
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Kind regards,
max

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
0
-250
-634
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


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RangeMin(column1,column2)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try this on the script:
table:
LOAD * Inline [
column1,column2
300,45
-250,2000
-634,-4
];
table1:
LOAD
if(column1>=0 and column2>=0,0, if(column1<column2,column1,if(column2<column1, column2))) as final
Resident table;
PFA

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be like this:
Input:
Load
ID,
ID1
from ABC;
Noconcatenate
Temp:
Load
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
resident Input;
Drop table Input;
In Expressions:
num(Previous(ID1),#,##.0;(#,##.0)).

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