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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Format to negative in Set analysis


Hello!   I have a set analysis formula  to get the projected ending inventory...Thus,  I would like to convert one of the item (Sales Order) to negative so  the SalesOrder value will be deducted from the total value.

So my values would look like this

Aspect

Inventory                         35000000

Sales Order A                      -500000

Sales Order B                       -200500

Open PO                         10000000

Total                          44,299,500     desired results ....Right now, it's adding everything.

sum({$<Aspect = {SalesOrder*',' Inventory','Open PO'}>}Value)


Tks.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Thank you, Clever...It worked... Anyway, may I know what does the -1,1 mean?

View solution in original post

3 Replies
Clever_Anjos
Employee
Employee

sum({$<Aspect = {SalesOrder*',' Inventory','Open PO'}>}  Value*if(Aspect like 'SalesOrder*'',-1,1) )

Anonymous
Not applicable
Author

Thank you, Clever...It worked... Anyway, may I know what does the -1,1 mean?

Clever_Anjos
Employee
Employee

I´m multiplying by -1 the number when Aspect like 'Sales*' doing that is same thing then subtracting.

By the way... I think you should mark my answer as correct, right? Could you kindly do that?