Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
MindaugasBacius
Valued Contributor III

Total and if statement

Hei,

I faced a little issue:

Screenshot_2.jpg

I've attached also and the test.qvd.

Could you help me?

Thank you!

Tags (2)
1 Solution

Accepted Solutions

Re: Total and if statement

May be use Sum of rows if this is a straight table like your sample

Capture.PNG

3 Replies

Re: Total and if statement

May be use Sum of rows if this is a straight table like your sample

Capture.PNG

Re: Total and if statement

Or use this

Sum(Aggr(If(Sum(F2 - 1)/Sum(F2)<=0.5, Sum(F2), Sum(F2 - 1)), A, F2))

Re: Total and if statement

Hi, can you explain the issue? Maybe you want "Sum(F2) - 1" (the -1 outside parenthesys) for Diff?

Edit: Ok, thanks Sunny.