Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to calculate a flag where previous row and current row is same then give 'matched' else 'unmatched' in qlikview back end script.So when I select Flag as Matched I will get only those material no whose sales are matched .
Material | Report | Sales_New |
---|---|---|
000002FS | Qlikview | 3510 |
Shad | 3640 | |
4A3055 | Qlikview | 1275 |
Shad | 1275 | |
9094200 | Qlikview | 11352 |
Shad | 11352 |
Make sure your data is sorted right. Then use previous function (all in the script)
If(previous(Sales_new) = Sales_new, 'Matched', 'Unmatched') as Flag
Hi,
You will need to look at PEEK() or PREVIOUS() functions
Mark
Is that value you need by Material?
Try like this:
Load
Material,
Report,
Sales_New,
if(previous(Material)=Material and previous(Sales_New)=Sales_New, 'Matched', 'Unmatched') as Flag
from <>
order by Material;
Br,
KC