Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I have a requirement where I have to get the values from previous calculation if the numbers are not present. For example for week 3 & week 4 I need to derive the values from Week 2. So, I am using above() to get to my answer and when I use the above() function the below table1 becomes like that in table 2 as shown
Table 1:
Week | Sum(Amount) |
1 | 1000 |
2 | 2000 |
3 | 0 |
4 | 0 |
5 | 3000 |
Table 2:
Week | Above(Sum(Amount)) |
1 | 1000 |
2 | 2000 |
3 | 2000 |
4 | 0 |
5 | 3000 |
I want to have Week 4 also as 2000. So, can anyone help me to get that or is there a better way to do this?
Thanks,
Don
would using sum(above(amount)) be a better representation of what you're trying to go for?
Hi Robert,
I want to show Week 4 as also 2000.
I'm not sure I fully understand what your scenario is, could you share a sample qvw?
I have attached a sample QVW...
Hi Don,
please take look at attached script file. Its not an exact answer on your question but perhaps it helps.
I would say the reason why above "doesn't work" in week 4 is because sum(Amount) in week3 = 0. If you know that this happens only 2 times you could just use another "IF".
Like that:
IF(sum(Amount)=0,IF(Above(sum(Amount))=0,Above(sum(Amount),2),Above(sum(Amount))),Amount)
I have to admit that it looks not very nice and if possible I would do it in script.
If needed I can upload a sample qvw tomorrow.
Best Regards,
Peter
If you can upload a sample qvw, that'll be great... thanks for the help!!!
Hi,
take a look at attached example.
This works... Thanks!!!!