Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
A | B | C |
JAN | ||
Machine | 21 | 62,5 |
26 | 4,4 | |
Cons. | 4,1 |
Hi
I have a table as above and i would like to pick out the value from Cons. for JAN.
I have tried like this: sum(if(A='Machine' and B='Cons.',C)) but i only get 0 as result (should be 4,1).
What am i doing wrong?
Bets regards
/Mats
First of all you have to create the data as shown below then you can use your expression
sum(if(A='Machine' and B='Cons.',C))
otherwise it would not give proper results .
You have merged cells in Field A,
Qlikview do not consider merged cells as one , it evaluates them as different cells so only first cell will have value and others So you have to populate them first.
A | B | C |
JAN | ||
Machine 1 | 21 | 62,5 |
Machine 1 | 26 | 4,4 |
Machine 1 | Cons. | 4,1 |
Machine 2 | 21 | 119,3 |
Machine 3 | 26 | 6,3 |
Machine 4 | Cons. | 6,3 |
Machine 3 | 21 | 45,5 |
Machine 4 | 26 | 4 |
Machine 5 | Cons. | 3,6 |
hi
try this
sum(if(B='cons.',C))
Hi,
Try below Syntex
Ex: Only({$<B={"Cons."},A={"Machine 2"}>}C)
Can you provide more specific table data?
What values have the rows 2 and 3 for A? If they are blanck or null, try sum(if(B='cons.',C))
If their value is "Machine", your expression sum(if(A='Machine' and B='Cons.',C)) should work.
Regards.
Luis.
Ok, i did not tell all of it, sorry. In Column A i have several Machines, like this:
A | B | C |
JAN | ||
Machine 1 | 21 | 62,5 |
26 | 4,4 | |
Cons. | 4,1 | |
Machine 2 | 21 | 119,3 |
26 | 6,3 | |
Cons. | 6,3 | |
Machine 3 | 21 | 45,5 |
26 | 4 | |
Cons. | 3,6 |
I want to for example pick out the value of Cons. for JAN only for machine 2
/Mats
First of all you have to create the data as shown below then you can use your expression
sum(if(A='Machine' and B='Cons.',C))
otherwise it would not give proper results .
You have merged cells in Field A,
Qlikview do not consider merged cells as one , it evaluates them as different cells so only first cell will have value and others So you have to populate them first.
A | B | C |
JAN | ||
Machine 1 | 21 | 62,5 |
Machine 1 | 26 | 4,4 |
Machine 1 | Cons. | 4,1 |
Machine 2 | 21 | 119,3 |
Machine 3 | 26 | 6,3 |
Machine 4 | Cons. | 6,3 |
Machine 3 | 21 | 45,5 |
Machine 4 | 26 | 4 |
Machine 5 | Cons. | 3,6 |