Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Two formuals issue

HI guys,

I have an expression

Sum (if (TxnType<>'Estimate' and TxnType<>'Sales Order',Amount,0))

This works

But i need to do add something more to do it.

I need to add

If (TxnType = 'Credit', Amount*-1, Amount) to this same expression.

so basically i need is

SUM

(

     while (rowcount)

     {

          if (TxnType<>'Estimate' and TxnType<>'Sales Order') Then

               Amount = Amount;

          else

               Amount = 0;

          If (TxnType = 'Credit') Then

               Amount = Amount * -1;

          else

               Amount;

     }

)

Can you please tell me how to do that.

Thanks,

Saurabh

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

Try

Sum (if (TxnType<>'Estimate' and TxnType<>'Sales Order',

          if(TxnType = 'Credit',-Amount,Amount)

          , 0)

          )

View solution in original post

2 Replies
swuehl
Champion III
Champion III

Try

Sum (if (TxnType<>'Estimate' and TxnType<>'Sales Order',

          if(TxnType = 'Credit',-Amount,Amount)

          , 0)

          )

Not applicable
Author

It is working.

Thanks!