Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

set analysis if statement

I have a statement which I am finding it hard to get my set analysis correct in (i think this would be the best approach)

My statement needs output this:

If the sum of onhand* cost is less or equal to the sum of the use type 'Gross Requirements' in period value but only in bucket 1 then output 1,

If not,

the sum of onhand* cost is less or equal to the sum of the use type 'Gross Requirements' in period value but in bucket 1 and 2 then output 2,

If not ,

the sum of onhand* cost is less or equal to the sum of the use type 'Gross Requirements' in period value but in bucket 1 and 2 and 3 then output 3,

I need this to be repeated up to 36 buckets

At the moment i have this.......

=if(sum(ONHAND_QTY*COST) <= (sum({<USE_DESC_TYPE={"Gross Requirements Amt"}>}PERIOD_VAL and BUCKET_NUMBER = 1),1,

My problem with this is that Bucket number is just a field that is silled with 1,2,3,4,5,6,- 36 so cannot be summed.

If anyone could help that would be greatly appreciated,

12 Replies
sunny_talwar

I am still not sure I am able to understand the required output for the data provided... can you give me the exact numerical value you would want to see in the text box object based on the data provided?

Anonymous
Not applicable
Author

I have attached another example which hopefully will explain it a bit more. I have split it out into 3 text boxes with a description in those.

Let me know if you need more description still

sunny_talwar

All I am looking for is the numerical output that you expect to see in these text boxes... for example... tell me something like this

Sunny,

I want to see 10 in text box 1 and that is because .....

I want to see 800 in text box 2 and that is because....

I want to see 2 in text box 3 and that is because....