Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody, does anybody know how to make this comparison ?
Example, i have one table with batch and how many itens sended with sucess or fail per period:
date | batch | sucess | fail |
01/01/22 | 1 | 50 | 30 |
01/01/22 | 2 | 30 | 15 |
01/01/22 | 3 | 15 | 0 |
what a i need compare is: the itens sended on batch 2 are all who failed in batch 1 ?
I tested above() function graphs, more i can compare only how sucess or fail.
Anyone have a idea to me ?
Thanks in Advance.
Hi, in report level you can try to work with the same above() function:
if(batch=1 or sucess= above(total fail), 'correct', 'wrong')
Similarly in load script you can do the same, but with previous() function:
load *,
Previous(fail) as prev_fail, //your previous fail value if needed
if (batch=1 or sucess= Previous(fail), 'correct', 'wrong') as indicator //indicator to check is it ok
resident your_data_table
order by date, batch;