dear friends,
I am new to qlik view and was trying to do a sum expression where the summation Is dependent on another column status.deduct
I would like to sum the consumption of a particular material in which "MAT.MOV._TYPE" if 261 or 201 then it Should add up and in case of 202 or 262 or 222 the same should .
i.e: Total consumption_ Qty = Sum of mov. type 201,221,261 - sum of mov. type 202,22,262.
can any one please Share the expression.
anil gopal
CONSUMPTION_QTY | CONSUMPTION_UNIT | NET_VALUE | MAT.MOV._TYPE | MATERIAL_NO |
1 | SET | 17497.5 | 261 | 000000002618025007 |
1 | SET | 17497.5 | 262 | 000000002618025007 |
1 | EA | 16830 | 201 | 000000002692109001 |
1 | EA | 16830 | 202 | 000000002692109001 |
0.1 | TO | 4848.97 | 261 | 000000009311110100 |
0.1 | TO | 4848.97 | 261 | 000000009311110100 |
0.32 | TO | 15509.39 | 261 | 000000009311110100 |
0.47 | TO | 22602.27 | 261 | 000000009311110100 |
0.47 | TO | 22790.16 | 261 | 000000009311110100 |
0.64 | TO | 31018.77 | 261 | 000000009311110100 |
0.8 | TO | 38471.95 | 261 | 000000009311110100 |
1.2 | TO | 58187.63 | 261 | 000000009311110100 |
0.64 | TO | 28920.25 | 201 | 000000009311110100 |
1.2 | TO | 56557.27 | 281 | 000000009311110100 |
1.8 | TO | 81899.64 | 261 | 000000009311110100 |
2.695 | TO | 121781.36 | 261 | 000000009311110100 |
2.695 | TO | 121781.36 | 262 | 000000009311110100 |
5.36 | TO | 232373.49 | 201 | 000000009311110100 |
5.36 | TO | 232373.49 | 202 | 000000009311110100 |
Thank You The Logic worked.
Not sure if that's exactly what you were asking for - as I don't see Status column in your data file. See attached qvw - calculation you were asking for has been created:
Total consumption_ Qty = Sum of mov. type 201,221,261 - sum of mov. type 202,222,262.
Thank You The Logic worked.