Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all, this is my first post and I am fairly new to QlikView so please bear with me.
I have a set of information illustrated by the table below, I have labelled them A, B & Boolean so hopefully the answer will apply to more people than just my specific case.
Field A | Field B | Boolean |
---|---|---|
A1 | B1 | 1 |
A1 | B2 | 0 |
A1 | B3 | 0 |
A1 | B4 | 1 |
A2 | B1 | 1 |
etc | etc | etc |
In my application though, Field A is basically a project number, Field B is a project phase and the boolean is whether or not that phase is complete.
Basically what I need is to be able to say 'If B2 is not complete AND B1 is complete then B2 is due' So that the output would look something like:
Field A | Field B | Is it Due |
---|---|---|
A1 | B2 | Due |
etc | etc | etc |
I thought something like:
=if(FieldB='B2' AND Boolean = 0, if(FieldA='B1' AND Boolean = 1, 'Due', 'Not Due'))
But I think I'm on completely the wrong track, do I need to load the information differently?
Hopefully this is clear enough, and I'm not asking too stupid a question
I'm not sure why you need the aggr(). If you make the dimensions FieldA & FieldB then:
=if(NOT Boolean AND Above(Boolean), 'Due', '')
-ob
Hi,
As i understand might you have looking for this please check code
T:
LOAD * Inline
[
FieldA,FieldB,Boolean
A1, B1, 1
A1, B2, 0
A1, B3, 0
A1, B4, 1
A2, B1, 1
etc, etc, etc
];
load
FieldA,FieldB,Boolean,
if(Boolean = 0,'Due','Not Due') as Flag
Resident T;
DROP Table T;
Hope this helps
Thanks & Regards
Hi Anand,
Thanks a lot for responding,
Not quite, If a project phase is not complete it is not necessarily 'Due' because of dependencies. The important part is that, if the phase before it is complete then it is due so in this example below:
Field A | Field B | Boolean |
---|---|---|
A1 | B1 | 1 |
A1 | B2 | 0 |
A1 | B3 | 0 |
A1 | B4 | 1 |
A2 | B1 | 1 |
In project 'A1' phase 'B2' is Due, but 'B3' is not.
Hi,
Ok but how you identify the B3 is not Due and what is the use of Boolean field.
Hope this helps
Thanks & Regards
Well exactly, that is what I am asking. Perhaps I was not clear enough. Is there an expression I can write for the given table to add a column saying 'If the row above is complete and this row is not, then it is due'
The boolean says whether a row is complete or not.
Sorry if it is not a very good question
Hi,
Yes you are right if any field is created with check the project is completed or not then you are able to display that in application is there any other field.
Hope this helps
Thanks & Regards
I think there has been some mis-communication, thank you for your help anyway
Hi,
I think there is some reference field for that.
Hope this helps
Thanks & Regards
Hi,
Just Try this in your script,
If(FieldB='B2' AND Boolean=0,'Due') as [Is it Due]
Regards,
Hi Maxdreamer,
Thanks for your response, unfortunately this is not what I am after,
"If a project phase is not complete it is not necessarily 'Due' because of dependencies. The important part is that, if the phase before it is complete then it is due"
It appears what you suggest would just say Due if the Boolean is 0
Regards