Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I reverse the sign on QlikView ?

How can I reverse the sign on QlikView?

Hello everybody,

I've been using QlikView for about 4 weeks now and I'm getting it right

Nevertheless, I need your help ..

In my ERP system, the outgoing invoices are filled with transaction types. The formula itself works, however the occupancy type 'G' must be displayed as minus amount.

sum (

     {<

     Record Type = { 'R', 'G', 'O'},

Flag_Artikelfamilie_vorhanden = {1}

     >}

     rangesum (

#Sales,

-#Value

)

     )

At the moment, QlikView adds all sales from the individual occupancy types, so far so good. Type 'G' must be subtracted.

Can you help me?

Many Thanks

2 Replies
Anonymous
Not applicable
Author

If you're satisfied with the expression, don't change it.  Instead, change the sign in the load script, something like:

if("Record Type"='G',-1,1)*Sales as Sales

Gysbert_Wassenaar

Here's one option:


sum (

     {<

     Record Type = { 'R', 'G', 'O'},

Flag_Artikelfamilie_vorhanden = {1}

     >}

     rangesum (

#Sales * pick(match('R','G','O'),1,-1,1),

-#Value

)

     )


talk is cheap, supply exceeds demand