Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try

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

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

          , 0)

          )

View solution in original post

2 Replies
swuehl
MVP
MVP

Try

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

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

          , 0)

          )

Not applicable
Author

It is working.

Thanks!